I occasionally see 401 responses calling access_token.
At the point of call, I have valid request tokens. The user has been
redirected to Twitter, has authorized the app (as evidenced by the
fact
that the user is redirected to the apps's callback URL).
The application uses the oauth_token parameter to retrieve the request
token secret from session data. The stored request token and
oauth_token parameters match, so I'm confident the correct request
token
secret is retrieved.
Yet, calling access_token with the request token/secret and verifier
fails.
I thought it was perhaps a spurious error, so I wrote a retry loop.
Here's a brief snippet from the application log:
access_token returned 401; retrying in 0.25 seconds
access_token returned 401; retrying in 0.5 seconds
access_token returned 401; retrying in 1 seconds
access_token returned 401; retrying in 2 seconds
final error => GET https://api.twitter.com/oauth/access_token
failed: 401 Unauthorized
Why would a call to access_token fail immediately after the user has
authorized the application?
-Marc
--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group:
http://groups.google.com/group/twitter-development-talk?hl=en