(The platform I am coding for does not have any oAuth libraries available so I am writing my own code to interface with Twitter)
I am having an issue with the oauth/request_token endpoint always returning HTTP 401 - Unauthorised.
If I use the access token provided on my application’s page, I can post status updates etc. successfully.
I am performing a POST to http://api.twitter.com/oauth/request_token
There are no parameters being passed in the POST body
An example authorisation header is as follows :-
Authorization: OAuth oauth_callback=“http%253A%252F%252Fwww.kfa.co.uk”, oauth_consumer_key=“TJnY0B0OGa6GgfkDidIc2A”, oauth_nonce=“24E7F80126CB1954ADDD0004AC12062E”, oauth_signature=“eICO6ODHH7Ba8RpQiq5pRZhKhT0%3D”, oauth_signature_method=“HMAC–SHA1”, oauth_timestamp=“1320685370”, oauth_version=“1.0”
Other information from the request is as follows :-
POST /oauth/request_token HTTP/1.1
Host: api.twitter.com
User-Agent: KFA-Twitter
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Authorization: OAuth oauth_callback=“http%253A%252F%252Fwww.kfa.co.uk”, oauth_consumer_key=“TJnY0B0OGa6GgfkDidIc2A”, oauth_nonce=“24E7F80126CB1954ADDD0004AC12062E”, oauth_signature=“eICO6ODHH7Ba8RpQiq5pRZhKhT0%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1320685370”, oauth_version=“1.0”
I have used an online test utility to validate my signature generation and that appears to be correct. I am at a loss to work out what the problem is with my request…
Thanks for any help.
Stu