Get username and password of a contact using REST

Hi Mel,

So the key factors are going to be AccountName and AccountType (both string values). For AccountType you would give the name of the social media (think facebook or twitter) and for the account name it would be the account id or the url link for the account, so AccountName for us might be ‘theplanbclub’ for twitter or ‘Redirecting...’ for facebook. You don’t need to set every field as that will be relevant to the current date/time etc.so AccountType, AccountName and ContactId would be what I would focus on setting, at least to get a working place to start with.

1 Like

Thank you very much for your clear description. Now I have overcame the obstacle.

I have another query. Is there any possible way to retrieve all the categories and tags?

I have found the way. Please do not bother about the previous comment. Currently I have no other query. Thank you very much for your tremendous support. And I will again get back to you if I face any problem.

Hello,

While using the following code -

$infusionsoft->data()->add('SocialAccount',array(
	'AccountName'=>'https://www.twitter.com/*****',
	'AccountType'=>'Twitter/Facebook/LinkedIn',
	'ContactId'=>1614
				)
			);

Facebook and LinkedIn is working fine and the added data is shown in the contacts details. But unfortunately when I am adding Twitter, it is not showing. Could you please tell me why I am facing this anomaly?

Thanks in advance.

I tried this using only Twitter (as apposed to Twitter/Facebook/LinkedIn) for AccountType and it worked for me?

Hello,
I am having a problem. I have already stored and used the access token according to your suggestion. But sometimes I am getting unauthorized exception. I am not understanding how to handle it.

Please let me know -

  1. Why I am receiving this error
  2. Is there any function to check and handle handle this error?

Thanks in advance.

The only time I’ve seen that with tokens that are still valid is if the client_secret/client_id weren’t assigned before the call?

If you can supply the response headers for failed calls it could help narrow down.

Can I fetch the records which have valid username & password only using xml-RPC?

Via the XML-RPC interface you can query the DataService for Contact records, which contain the Password field.