Access Token

This endpoint allows you to exchange short-lived Instagram User Access Tokens for long-lived Instagram User Access Tokens.

Creating

This operation is not supported.

Reading

GET /access_token

Exchange a short-lived Instagram User Access Token for a long-lived Instagram User Access Token.

Limitations

Requests for long-lived tokens include your app secret so should only be made in server-side code, never in client-side code or in an app binary that could be decompiled. Do not share your app secret with anyone, expose it in code, send it to a client, or store it in a device.

Requirements

Request Syntax

GET https://graph.instagram.com/access_token
  ?grant_type=ig_exchange_token
  &client_secret={instagram-app-secret}
  &access_token={short-lived-access-token}

Query String Parameters

Include the following query string parameters to augment the request.

KeyValue

client_secret
Required
String

Your Instagram app's secret, displayed in the App Dashboard > Products > Instagram > Basic Display > Instagram App Secret field.

grant_type
Required
String

Set this to ig_exchange_token.

access_token
Required
String

The valid (unexpired) short-lived Instagram User Access Token that you want to exchange for a long-lived token.

Response

A JSON-formatted object containing the following properties and values.

{
  "access_token": "{access-token}",
  "token_type": "{token-type}",
  "expires_in": {expires-in}
}

Response Contents

Value PlaceholderValue

{access-token}
Numeric string

A long-lived Instagram User Access Token.

{token-type}
String

bearer

{expires-in}
Integer

The number of seconds until the long-lived token expires.

cURL Example

Request

curl -X GET \
  'https://graph.instagram.com/access_token?grant_type=ig_exchange_token&&client_secret=eb87G...&access_token=IGQVJ...'

Response

{
  "access_token": "lZAfb2dhVW...",
  "token_type": "bearer",
  "expires_in": 5183944
}

Updating

This operation is not supported.

Deleting

This operation is not supported.