Getting Started with Instagram’s API
(or “How to obtain your Instagram Access Token”)
Most Instagram API tutorials or demonstrations will make reference to your Instagram “Client ID“, “Client Secret” and “Access Token“, (these values are required for connecting to Instagram), but they don’t always make it clear how you go about getting them. Luckily, we are here to talk you through it!
Firstly, you need to register your “Application” and a “Client” with Instagram:
- Go to instagram.com, and make sure you are logged in to your Instagram account.
- Then, go to instagram.com/developer, and click on the “Manage Clients” button in the top navigation bar:
If this is your first time, you will be taken to the “Developer Signup” page, (if it’s not, skip Step 3).
(You can enter anything here, but if you’re a serious developer it’s worth entering your real details, as you will probably need to get your app whitelisted by Instagram. Incidentally, it’s unclear whether “Your website” refers to the title or URL).
- Now, repeat Step 2, clicking on the “Manage Clients” button again. This time you will be taken to the Manage Clients page, with a message reading “You have not registered any clients with the Instagram API”. Click the “Register a New Client” button to get started.
- Register your new “OAuth Client“, by supplying your application name and description, website and OAuth redirect_uri. For “website” and “OAuth redirect_uri” enter your root domain, and the URL of a PHP file you can edit respectively, so for example:
OAuth redirect_uri: http://www.domain.com/info.php
- After clicking the “Register” button, you’ll be taken to your Client Info page, which contains the following information:
Client ID: 8706649a21c631454a878641dcef61be
Client Secret: cbd4d8f42acf03e4fc43a75934ead0b5
Website URL: http://www.domain.com/
Redirect URI: http://www.domain.com/info.php
Make a note of these details for later.