When I get an access token from Twitter I get something like the following:
oauth_token=14410002-F5Bi8hMpQbXamM8MBBw8zw2LYIBL4FEBvxLZfaSwX&oauth_token_secret=K8QNvDcC2f9qtGU8tfa75exwLZ2Sc1jeHrThnk6Co&user_id=14410002&screen_name=blueonion
What is the oauth_token_secret? Is that what is used to sign protected requests or is the consumer_key still used.
Twitter allows you to obtain user access tokens through the 3-legged OAuth flow, which allows your application to obtain an access token and access token secret by redirecting a user to Twitter and having them authorize your application.
An access token and access token secret are user-specific credentials used to authenticate OAuth 1.0a API requests. They specify the Twitter account the request is made on behalf of.
The short answer is: The oauth_token
and the oauth_token_secret
both make up the Request token which is used to sign requests.
Here are some resources which might help:
This is not the consumer key. The consumer key is only used for identifying the consumer (= the code which calls Twitter) while the Request Token is bound to the user. The Request Token consists then of a public and a secret part which are both used for signing the request as explained in the specification in section 9.
But you probably want to use one of the libraries and have a look at the examples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With