Get a Facebook Page Access Token That Never Expires

~3 min read

With the facebook API, page tokens can often be used in place of user tokens. This is very useful because if you are doing something with a business, its not ideal to have to use your own user token for everything. However, if you don't want to have to recreate a new token all the time, you have to go through the process of getting a long-lived page access token.

IMPORTANT! - Make sure that your user has permissions to access both the Facebook page and the Facebook groups, and make sure that the Facebook groups are linked to the Facebook page!

Now lets talk about some definitions:

short-lived user access token: This is the regular user_access_token, and it typically lasts about 2 hours.

long-lived user access token: This user access token last about 60 days and you get it by extending a short-lived user access token

page access token: These are similar to user access tokens and are created using a user access token.

If you create a page access token using a short-lived user access token, it is also short-lived and expires in about 2 hours.

But if you create a page access token using a long-lived user access token, then it does not have an expiration date. It lasts until its access is revoked.


To get a user access token you first have to have a facebook app, and then the user (in this case, you) has to grant permissions to your app. Specifically your app needs the permission called manage_pages.

The easiest way to do this is to use Facebook's Graph API Explorer.

Open up the page, then select your app Application dropdown and select "Get User Access Token" from the other dropdown:

Then in the popup, make sure you check the box for manage_pages and click "Get Access Token"

Then your access token will be populated in the Access Token field:

Ok, then we need to exchange that short-lived token for a long-lived token, and we can do it with this same Facebook Graph API Explorer tool.

We need to make a GET request to the Facebook Graph API to the path /oauth/access_token with the following parameters:


So make a string that looks like this:


And paste it into here and you'll get your long-lived access token in the response:

Now that you have your long-lived user access token, we can exchange it by making a GET request in the Facebook Graph API Explorer to get the long-lived page access token.

You need to take that long-lived user access token and paste it into the Access Token field then put this in the path field:


Then you will get your long-lived page access token in the response!

Facebook Documentation: