Reputation: 2279
I have been toying around with the twitter API over the last few days, but seem to be stuck at requesting a "request token". (flow A)
Over at the twitter api, I should be hitting the following end point (https://api.twitter.com/oauth/request_token) and on a successful request this should net me an oauth_token
, oauth_token_secret
and oauth_callback_confirmed
(should match what I pass). I attempted to just use my private key, but this of course is failing. Is my understanding of how to generate this request wrong?
I believe my issue is the way I am generating the oauth_signature
. Reading the documentation at twitter, everything seems straight forward until I need to generate signing key documented Here. It states that the signing key should be Consumer Secret
& OAuth token secret
, but to me this is a circular reference. The response, for this request, should contain the oauth_token_secret
.
Upvotes: 0
Views: 1179
Reputation: 2901
With this request an empty oauth_token_secret
is expected. Signing key should be consumer_secret&
, the trailing &
must be included.
Relevant quote from https://www.rfc-editor.org/rfc/rfc5849#section-3.4.2:
An "&" character (ASCII code 38), which MUST be included even when either secret is empty.
Upvotes: 1