Get username and password of a contact using REST


(John Borelli) #21

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 ‘https://www.facebook.com/theplanbclub/’ 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.


(Melodie moore) #22

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?


(Melodie moore) #23

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.


(Melodie moore) #24

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.


(John Borelli) #25

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


(Melodie moore) #26

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.


(John Borelli) #27

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?


(Bradley Booth) #28

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