How to check whether an access token is expired or not?


#1

I just want to check the availability of a valid access token…


#2

Hi Jinto,
I am looking for the same thing, have you found any solution?


#3

Ok found the solution here :https://dev.twitter.com/docs/auth/oauth/faq

Technical
How long does an access token last?

We do not currently expire access tokens. Your access token will be invalid if a user explicitly rejects your application from their settings or if a Twitter admin suspends your application. If your application is suspended there will be a note on your application page saying that it has been suspended.


#4

You can also check in on the integrity of an access token at any time by calling the [node:14] while using that access token.


#5

@episod
//You can also check in on the integrity of an access token at any time by calling the GET account/verify_credentials while using that access token.//

What about this now in te updated version 1.1


#6

There is also an account/verify_credentials method also in API v1.1: [node:9749].


#7

Can we expire access token by ourselves…??


#8

No, you cannot.


#9

I am definitely having a problem with tokens expiring, despite what the company says about them not expiring. Seemingly randomly, when my app tries to unfollow someone, anyone really, there’s a chance that my access token vanishes, as well as my apps access to my account gets revoked. I (the owner of the app as well as the owner of the account the app is linked to) never revoked my app’s access to the account, nor did i refresh my token.
Does anyone have any idea what’s going on? Am I hitting an unfollow or activity limit that twitter is not notifying me about?
Currently, the only way to get around this problem is by manually requesting access, putting in a pin, and manually saving the new token i get, every single time my token randomly craps out, which is quite frustrating as you can imagine. :stuck_out_tongue: