cfgneq
Last Updated: November 12, 2017
·
10.91K
· cheneveld
473f56292b33cf9257d7501bdc2cfa43

HowTo: Generate Instagram access_token for API use

  1. Create an client via http://instagram.com/developer/clients/register/
  2. Capture the clientid, clientsecret and redirect_uri.
  3. Hit the following url with the appropriate client_id and redirect URL

    https://instagram.com/oauth/authorize/?client_id=your_client_id&redirect_uri=your_redirect_uri&response_type=code

  4. A url redirect will take place that will look like #{redirecturi}?code=yourcode

  5. Copy that code

  6. Run the following curl:

    curl -F 'client_id=your_client_id' \

    -F 'client_secret=your_client_secret' \

    -F 'grant_type=authorization_code' \

    -F 'redirect_uri=your_redirect_uri' \

    -F 'code=your_code' \https://api.instagram.com/oauth/access\_token

  7. The response will contain your access_token

Say Thanks
Respond

3 Responses
Add your response

11810
606e13a37094d6967ecaac22f6f2e0ce

How to run this Curl command

over 1 year ago ·
11812
606e13a37094d6967ecaac22f6f2e0ce

Curl -F 'clientid=dce19c3dfb624242949105c60a9215bd' -F 'clientsecret=ddaaf9674aad484899c829947746c4ee' -F 'granttype=authorizationcode' -F 'redirecturi=http://localhost:2163/Main.aspx' -F 'code=6b86710236a140c7875eef65bd9214b8' https://api.instagram.com/oauth/accesstoken

I framed liken above but it throws error code 400 , You mush provide Client Id

over 1 year ago ·
14551
567d1823df1ed8cf1b2e93e86672fba7

You misspelled client_id as clientid (without a underscore), the same goes for the other attributes as well.

over 1 year ago ·