I am building a web app from where the user can manage his twitter account. I've created the twitter app and once the user authenticates himself the application gets the access token from twitter. Does this access token expire or I can store it and make request, on user's behalf, without asking from him to log in again ?
2 Answers
Here is what they saying in there development page
Question: How long does an access token last?
Access tokens are not explicitly expired. An access token will be invalidated if a user explicitly revokes an application in the their Twitter account settings, or if Twitter suspends an application. If an application is suspended, there will be a note in the Twitter app dashboard stating that it has been suspended.
More details can be found here

- 8,607
- 7
- 54
- 86

- 23,407
- 37
- 132
- 204
-
39i love stack overflow for this kind of question answers. 13 sec to find out. probably 2 min on twitter doc – Nicolas Manzini Oct 29 '12 at 14:06
-
1I actually visited this page, read, checked the answer, read "currently", and then just to verify had to go to the docs. and then when i came back, I saw your comment. Just felt like adding to it :) – Amogh Talpallikar Mar 06 '13 at 10:04
-
Yeah, I see both sides of the issue. But, when all else fails, RTFM :) – Whatevo Dec 31 '13 at 21:18
-
Now, I guess twitter uses IDS and Bot detection systems to automatic expire the access token if the detected activity seems like bot activity. – Harsh Vardhan Ladha May 29 '16 at 03:25
From the Twitter API error codes it looks like it can expire:
API request contains invalid bearer token Using an incorrect or revoked bearer token to make API requests will result in:
HTTP/1.1 401 Unauthorized Content-Type: application/json; charset=utf-8 Content-Length: 61 ...
{"errors":[{"message":"Invalid or expired token","code":89}]}
Source link: https://dev.twitter.com/oauth/application-only

- 3,340
- 1
- 30
- 28