Long-lived access tokens: how to find out when they will expire
3

In regards to this change: https://developers.facebook.com/blog/post/v2/2018/04/09/user-access-token-changes/

We use long-lived access tokens. Their expiry date is set to None, when looking at it in the Access Token Debugger. However, as stated here, they also expire after 90 days: https://developers.facebook.com/docs/facebook-login/access-tokens/refreshing/

My question is: what endpoint can tell us the remaining time until a long-lived access token expires?

Alon
Asked about 7 years ago
Selected Answer
2

As Dylan mentioned, if the debugger is showing incorrect information please file a bug report. If you're looking to programmatically check the meta data of the access token you can use the debug_token endpoint of the Graph API as documented here.

GET /v3.2/debug_token?input_token={input-token} HTTP/1.1
Host: graph.facebook.com

Returns fields such as: - expires_at - data_access_expires_at - is_valid

March 27 at 3:33 AM
Gary
Selected Answer
3

If the token debugger is inaccurate maybe this should be a bug report to fix that?

However, I had similar questions about the expiration of long lived page access tokens: https://developers.facebook.com/support/bugs/1059134697594011/

They responded by updating the documentation to mention that long lived tokens created by page administrators will not expire: https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension/

March 26 at 10:33 PM
Dylan
Alon

Thanks, that's good info to know.

March 28 at 9:25 AM