Help!! Oauth weirdness, invalid / expired token.

594 views
Skip to first unread message

Emmanuel

unread,
Feb 21, 2009, 2:14:45 PM2/21/09
to Twitter Development Talk
Hey, a couple of days ago I had Twitter OAUTH working just fine for
GET requests, but when I tried a few today, I keep getting invalid /
expired Token.

I still didn't get any POST requests to work btw, but that's a
different thread.

This is super weird, below is my return:

[request] => Array
(
[#text] => /favorites.xml?
oauth_version=1.0&oauth_nonce=69d47b6fef9cfa10dc7fdcbf58cd0f29&oauth_timestamp=1235243383&oauth_consumer_key=mykeyhere&oauth_token=tokenHere&oauth_signature_method=HMAC-
SHA1&oauth_signature=signature_here
)

[error] => Array
(
[#text] => Invalid / expired Token
)

Is this happening to anyone else?

Matt Sanford

unread,
Feb 23, 2009, 12:29:00 PM2/23/09
to twitter-deve...@googlegroups.com
Hi Emmanuel,

Since we improved the error messaging a bit that error message
now leads to something useful. When we tried to lookup your token it
was not found. Was this right after you exchanged the request token
for an access token, or had some time passed?

Thanks;
— Matt

Abraham Williams

unread,
Feb 23, 2009, 12:49:58 PM2/23/09
to twitter-deve...@googlegroups.com
How long does it take for a request token to expire?
--
Abraham Williams | http://the.hackerconundrum.com
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.
Sent from: Madison Wi United States.

Matt Sanford

unread,
Feb 23, 2009, 12:57:58 PM2/23/09
to twitter-deve...@googlegroups.com
Hi there,

    A request token is expected to be very short lived, since it's only used to exchange for an access token. Right now they do not expire but in an upcoming change we're going to limit them to a one hour life span to improve performance and scalability. The life span of an access token is detailed at http://apiwiki.twitter.com/OAuth-FAQ.

Thanks;
  — Matt Sanford
Reply all
Reply to author
Forward
0 new messages