Authentication and access tokens
Updated: Oct 13, 2026
Copy for LLM
The Instagram API with Unified Login is built on Facebook Login for Business. Your business clients can log in with Instagram or Facebook, and in both cases your app receives the same type of access token and calls the same API host.
Configuration ID
When you create a configuration in the App Dashboard, Meta gives it a
config_id. Your login URL includes it so that Meta asks your client for the right permissions and assets.The
config_id isn’t a secret. It identifies the configuration but doesn’t give access to any data.Exchange the code for an access token
Your app doesn’t receive an access token directly from the login flow. When your client completes the login flow, Meta redirects them to your redirect URL with a
code. Exchange that code for an access token by making a server-to-server call:GET https://graph.facebook.com/v27.0/oauth/access_token?
client_id=<META_APP_ID>
&client_secret=<META_APP_SECRET>
&code=<CODE>
Use your Meta app ID and app secret, not your Instagram app ID and secret. Make this call from your server, and never expose your app secret in client-side code. See Facebook Login for Business.
About the access token
Your app receives a Business Integration System User Access Token. The App Dashboard shows this as System-user access token (SUAT). This access token belongs to your client’s business portfolio, not to the person who logged in. It keeps working if that person leaves the business, and it covers every asset your client shared with your app for the chosen business portfolio.
Expiration
Whether the access token expires depends on your configuration. You choose the expiration when you create the configuration, and the configuration preview in the App Dashboard shows it. You can manage and refresh access tokens with the Business Integration System User Access Token Management API. The API uses your client’s business ID, so get the client business ID after your client connects and store it with the access token.
An access token also stops working if your client removes your app from their business portfolio or moves the Instagram account to another business portfolio. When an access token stops working, stop retrying and ask your client to connect again.
Store the access token
Keep access tokens on your server. Don’t put them in client-side code, logs, URLs, or analytics events. Store each access token with the client business ID, the Instagram account IDs, and the
config_id it belongs to, so you know which access token to use for each request and can refresh it later.The length of access tokens changes over time as Meta updates what they store and how they are encoded. Use a variable-length data type without a specific maximum size to store access tokens.
Make API requests
Send requests to
graph.facebook.com, and put the Instagram account ID in the request path:https://graph.facebook.com/v27.0/<INSTAGRAM_ACCOUNT_ID>
With this access token,
/me returns the business integration system user, not the Instagram account. To get the Instagram account IDs, call /me/assigned_instagram_accounts. See Get Instagram account IDs.If your app also uses the Instagram API with Instagram Login or the Instagram API with Facebook Login,
/me returns a different object in each setup. Always use the Instagram account ID with the Instagram API with Unified Login.