Find Expire Time for an access token (page_access_token) when using facebook Graph API in ASP.NET?

Is there any way to use the facebook graph api to find out when a page access token will expire?

There is now an API version of the debugger tool. See 

But I can't figure out the expire_date of my page_access_token. Please how can I find when token will expire in ASP.NET or Javascript.

In below picture I was figure out just the page_access_token and the id.





Asked by:- LuneAgile
: 563 At:- 10/22/2018 11:27:09 AM
ASP.NET graph api page_access_token expiration time

2 Answers
profileImage Answered by:- jaiprakash

You cannot get access token directly, however you can call debugging api

GET /debug_token?input_token={input-token}&access_token={access-token}

which will get your the time, the Access expier_at, you can check the details in this link

API response contains 

    "data": {
        "app_id": 000000000000000, 
        "application": "Your ApplicationName", 
        "expires_at": 1352419328, 
        "is_valid": true, 
        "issued_at": 1347235328, 
        "scopes": [
        "user_id": 1207059

Note that the issued_at field is not returned for short-lived access tokens

At:- 10/24/2018 9:01:12 AM Updated at:- 10/24/2018 9:01:47 AM
Thanks so much jaiprakash . That what I want. 0
By : LuneAgile - at :- 10/25/2018 11:39:50 AM

profileImage Answered by:- jaya

Access token is expiration is of 60 days, for creating token that never expire follow this answer here

I will say better read this article, to make extended tokens (Generate long-lived token for admin of the fan page ) (Generate long-lived token for fan page itself)

Resulted token will never expire (even if administrator of the fan page did log out)

At:- 10/22/2018 2:59:28 PM
Hi, Thanks. But I don't need to make my access page token not expired. I need to get the date of expiration of my access page token. from graph api 0
By : LuneAgile - at :- 10/22/2018 3:31:26 PM
You already have got your answer, already you will not get time of expire from api, but it can be for 60 days, as per docs. Default Page access token are short-lived so they expire in 1 or 2 hours. If you want to make it last longer you need to extend the short-lived to a long-lived access token so it will last approximatively 2 months (60 days). 0
By : vikas_jk - at :- 10/22/2018 4:04:50 PM
Thanks, but I need to retrieve this field expires_in from graph api and show it in my view. for example if the expires_in = 234556 I want to retrieve it. 0
By : LuneAgile - at :- 10/22/2018 7:20:27 PM

Login/Register to answer
Register directly by posting answer/details

Full Name *

Email *

By posting your answer you agree on privacy policy & terms of use

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly