Do twitter access token expire?

后端 未结 2 1842
梦毁少年i
梦毁少年i 2020-12-25 10:51

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 ac

相关标签:
2条回答
  • 2020-12-25 11:04

    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

    0 讨论(0)
  • 2020-12-25 11:24

    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

    FAQ Twitter

    0 讨论(0)
提交回复
热议问题