How to get an Instagram Access Token 2021


Step 1

Go to Facebook developers tools and create a new application.

Screenshot 1

Step 2

Enter the created application and go to Settings – Basic. Scroll down and add a platform (site). Then save the settings.

Screenshot 2

Step 3

Products – Instagram Basic Display. Create a new app.

Screenshot 3

Step 4

Set the redirect URI and other links

Screenshot 4

Step 5

Add a tester. This must be the Instagram account for which you receive the key.

Screenshot 5

Step 6

Go to profile settings in Instagram and accept the invitation.

Screenshot 6

Step 7

Using Instagram App Id and Redirect URI, follow the link:

Screenshot 7,user_media&response_type=code&state=1

and confirm the authorization

Step 8

Save the code from the address you were redirected to:

Step 9

Now you have to make a POST request to to obtain a short-term access token. This is what it looks like when you use curl in a console:

curl -d "client_id=INSTAGRAM-APP-ID&redirect_uri=REDIRECT-URI&grant_type=authorization_code&client_secret=INSTAGRAM-APP-SECRET&code=CODE "

In return, you get JSON containing access_token

Step 10

Follow the link using the access_token:

In return, you get JSON with a long-term key for 60 days.

Step 11

To update the long-term access key, use the link:

The update should be done while the key is still active.

Scroll to Top