function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SubhamSubham 

How to integrate with some other API- Say tripit using rest api

Folks,

 

I want to get data from some other API(TripIt). and store it in to salesforce custom object.

 

 

I have seen the tripit(Which stores travel plan of it's customer) api and Customer will be account in salesforce.

 

Tell me how to start. Can this be done using Oauth

 

If somebody has worked on getting data from some other API in to salesforce .Please share the code snippet or mail me at subham16@gmail.com along with the basic steps .

I know m asking too much but believe me it is very important.

 

 



Best Answer chosen by Admin (Salesforce Developers) 
SubhamSubham

Done through Oauth 1.0

All Answers

SubhamSubham

Done through Oauth 1.0

This was selected as the best answer
vinsrivvinsriv

Hi,

 

My requirement is to integrate salesforce with Linkedin and to show the shared connection between two contacts in a VF Page.

 

I have done the first step and generated the oauth_token and  in the oauth_callback, i have given the URL of Site with a VF page and same controller.

 

So, i generated a URL in the code as

 

LinkedAuthUri='https://api.linkedin.com/uas/oauth/authenticate?oauth_token='+unAuthorisedToken+'&oauth_callback='+o...


It gives me the URL as

 

https://api.linkedin.com/uas/oauth/authenticate?oauth_token=968c26de-8423-49ff-bab2-94fcfed60f88&oau...

If user validate this by clicking the link, it takes him to the site which i gave in oauth_callback and in the URL i get

 

oauthVerifier and oauthToken .

 

 

 

 

My problem is to get the oauthVerifier and oauthToken from the URL  so that i can send it in the request again.

 

i tried using ApexPages.currentPage().getParameters().get('oauth_verifier');


but it is coming as null because when the user verfies it  and then it takes it to the site i gave in oauth_callback. the controller is not getting instantiated again.

 

 

Any suggestion would be helpful.

 

 

Thanks,

Vineet