Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter oauth request token expiration

For getting access token in twitter api you firstly should get request token to make it possible grant access to user's account. I've found that access token does not expire unless it was revoked by user. What about request tokens? Do they expire? How long are they valid?

like image 870
megido Avatar asked Oct 01 '22 13:10

megido


1 Answers

Ok, I've found the answer on OAuth specification http://oauth.net/core/1.0/#anchor9

Used by the Consumer to ask the User to authorize access to the Protected Resources. The User-authorized Request Token is exchanged for an Access Token, MUST only be used once, and MUST NOT be used for any other purpose. It is RECOMMENDED that Request Tokens have a limited lifetime.

Here is also useful diagram of the oauth process (it took me long time to learn the flow)

enter image description here

So the answer is - very short.

PS: the reason why I was asking question is just to simplify the whole process by getting request tokens once and use it several times for different users.

like image 194
megido Avatar answered Oct 11 '22 01:10

megido