Attaining your account's OAUTH keys
First, you'll need to attain your Tripleseat account's public token and secret key. This can be found by logging in to your Tripleseat account and going to Settings -> Tripleseat API. If you don't have access to this area, you'll have to request it from the customer admin.
Authenticating Example
Once you have your keys, you need to set up and populate an OAUTH consumer object to interface with the Tripleseat API. (Opensource OAUTH libraries exist for all major programming languages - PHP, ASP.net, Ruby, Python, et al.)
Note: the following code example is in Ruby but should be very similar in other languages.
consumer = OAuth::Consumer.new(public_token, secret_key, {:site => 'https://api.tripleseat.com'})
With the consumer object set up, now just need to request an OAUTH AccessToken:
access_token = OAuth::AccessToken.new(consumer)
Finally, make sure the AccessToken is working by hitting our test API method:
response = access_token.get('/oauth/test_request')
If the response returns successfully (status 200), you should be golden and ready to start pulling data from our API methods.
Note: If your OAuth library gives you the option to put the Authentication information in the request header, use this setting.
Need help?
If you're having any problems with getting the above set up working, please do not hesitate to reach out to our Support Team with any questions.
Comments
0 comments
Article is closed for comments.