January 30, 2021

Instagram Access Token — Get It in 60 Seconds!

It’s hard acquiring an Instagram access token.

Luckily, your struggle ends today.

Today, you’ll learn how to get yours in this beginner’s guide (with screenshots). By the end of this post, you’ll be able to display an Instagram feed on your website.

(By the way, we don’t want to toot our horn, but it’s far easier embedding an Instagram Feed on your website using SocialProofed’s Instagram Feed widget. No coding is required, and you get to add ‘Shop Now’ buttons in your images — for free. Don’t believe us? Sign up for your account here. We’ll wait. 😄)


Step 1. Create Facebook App

Visit Facebook For Developers and click Create App.


Select what you’d like your app to do, and click Continue.


Enter your app display name, contact email, and business manager account (optional). Click Create App.


Next, click Settings > Basic

Scroll down and click + Add Platform.


Choose your platform.


Enter your site URL, and click Save Changes.


Step 2. Build Instagram Basic Display

Now, click the ‘+’ icon next to Products. 

You’ll spot Instagram Basic Display on the right. Click Set Up.


Facebook For Developers will prompt you to fill in the following fields:

  • Instagram Display Name (e.g., SocialProofed)
  • Valid OAuth Redirect URIs (e.g., https://socialproofed.com/auth) [Note: You will need this in Step 4.]
  • Deauthorize Callback URL (e.g., https://socialproofed.com)
  • Data Deletion Request Callback URL (e.g., https://socialproofed.com)

Click Save Changes.

Step 3. Add Instagram Tester

Click Roles > Roles.

Scroll down till you see Instagram Testers. Click Add Instagram Testers.


Enter your Instagram account username and click Submit.


Visit your Instagram account and click Edit Profile


Next, click Apps and Websites (on the left menu). 

You’ll see your newly created app on the right. Click Accept.

Step 4. Authenticate Instagram Tester(s)

Now, go back to Facebook For Developers and get your Instagram App ID.

(You can find this by clicking Products + > Instagram Basic Display > Basic Display. Scroll down till you see Instagram App ID.)

In this Authorization Window URL below, replace the bolded parts with your Instagram App ID and Valid OAuthRedirect URI (mentioned in Step 2.):

https://api.instagram.com/oauth/authorize ?client_id=256811246039216 &redirect_uri=https://socialproofed.com/auth/ &scope=user_profile,user_media &response_type=code

Enter this new URL in another browser tab to confirm authorization.

You should see your Instagram account and app’s name. Authorize to grant access. The site will direct you to the redirect URI with an authorization code. 

Tip: Can’t find it? It’s the long string of alphabets,  numbers, and signs after “/?code=”.

Step 5. Exchange Code For Instagram Access Token

You’re almost there!

Open your command line tool to make a POST request to Instagram API. 

Replace the bolded parts with your Instagram App ID, Instagram App Secret, Redirect URI, and Facebook’s code: 

curl -X POST \ https://api.instagram.com/oauth/access_token \ -F client_id={app-id} \ -F client_secret={app-secret} \ -F grant_type=authorization_code \ -F redirect_uri={redirect-uri} \ -F code={code}

Next, you’ll see a JSON containing your “access_token” and “user_id”.

Copy them. You’ll need them for Step 6.

Side note: If you want to generate a long-lived Instagram user access token for a public Instagram account, go to your Dashboard > Products > Instagram > Basic Display. Scroll down till you see User Token Generator. Click Generate Token.

Step 6. Query User Node

Paste your access token and user id in the bolded parts:

curl -X GET \ 'https://graph.instagram.com/{user-id}?fields=id,username&access_token={access-token}'

You should see your Instagram user ID and username. 

And, that’s it!

Are you overwhelmed by the number of steps and coding? Yeah, we don’t blame you. 

Fortunately, there’s an easier alternative.

Introducing: SocialProofed — Embed Your Instagram Feed On Your Website In Just 5 Minutes And Without Coding


Our Instagram Feed widget allows you to create your Instagram wall in any way you like

Adjust the number of columns, filter the type of images, customize your brand colors, you name it. Once you’re done, copy the HTML code in our generator and paste it on your website.

We built it for business owners in mind, and no coding is required. 

The best part? 

You can add ‘Shop Now’ buttons on your Instagram images — even when you’re on our free plan.

There’s a lot more to like about our Instagram plugin. Check out how we stack up against other tools:

Ready to boost engagement and attract new customer sales? Sign up for SocialProofed’s FREE Instagram Feed widget here.

Join the discussion

Your email address will not be published. Required fields are marked *