+ Start a Discussion

Integration with TripIT using rest API -How to get Request token

Has any one worked on getting data from TripIT in to salesforce using restAPI


I am very new to Oauth. And My task is only to get trip details for a user.No create/delete/replace anything of that sort.


I created a application after signing in http://www.tripit.com/developer.
Instantly i got key and Secret which i stored in
oauth_consumer_key and consumerKey_Secret
I also stored Signature method and version and dynamically generating noonce value and timestamp.
All good till here.

Now Please check and let me know if Endpoint is correct and I need to know which method or how can i generate Oauth_token_secret and Oauth_token

Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('https://api.tripit.com/oauth/request_token'); // Is this correct endpoint //1st issue???????

req.setHeader('Authorization','OAuth realm=\"https://api.tripit.com/\",oauth_consumer_key=\"'+oauth_consumer_key+'\",oauth_token=\"'+oauth_token+'\",oauth_nonce=\"'+nonceValue+'\",oauth_signature_method=\"'+oauth_signature_method+'\",oauth_timestamp=\"'+timeStamp+'\",oauth_version=\"'+oauth_version+'\",oauth_signature=\"'+signature+'\"');
// 2nd Issue Is this correct =OAuth realm=\"https://api.tripit.com/\"
//3rd and most critical from wher to get the value of oauth_token and secret?? which method or how will i get this


Best Answer chosen by Admin (Salesforce Developers) 

Too Late to post.. But for the people's who might need it.

Issue was solved after i changed the method to 'Post'


All Answers


Hi Subham,

Hope you have created a Remote Access App in the Salesforce Login.Where u can get the Client ID and Secret. using which u client application would use to login. and get the Access_Token On the fly. in set in the RequestHeader.




That sound something..


Dude, I haven't done anything like this.

I registered/created an application in trip it api. Nothing much.

Now i am trying to fetch data for some other user using Oauth.


Can this be done?

and secondly have you/Anyone done integration with any other api using oauth.

I am struggling to convert Oauth feature programatically. any code snippet where you people integrated with any other API would be appreciated.


I don't know how many request i need to create to get unauthorised access token then how to redirect user to some url so that he can click on a prompt window and allow me to acccess his data and once he does how to get the authorised access token so that i can store it some where in sfdc.

I know the flow but don't know how to write it :P

code snippet can help me






Too Late to post.. But for the people's who might need it.

Issue was solved after i changed the method to 'Post'


This was selected as the best answer
Accelerize DemoAccelerize Demo
Can I get the code for integration without using username and password
using cleintId and client Secret...can yiu please post it