Generating an Access Token for Instagram

Generating a token to be used in your application is actually fairly straightforward once you know the magical incantation. Just do the following:

    1. Write down the client ID, client secret, and redirect URI for the client you want to generate an access token for. You can find it on the “Manage Clients” panel in the Instagram Developer‘s site.
    2. Visit the following address replacing the client ID and the redirect URI:
    3. When prompted choose “Yes” to authorize the app
    4. You’ll be redirected to the redirect URI you supplied. At the end of the address you’ll see a request variable called code. Copy the value.
    5. Open Terminal (or favorite command line tool). Copy and paste the following. Replace the appropriate values:
    6. Copy the access token from the returned JSON object.

It should also be noted that the generated access token can still expire. It shouldn’t expire in the near-term but it’s not permanent.

 

Leave a Reply