Skip to content

Instantly share code, notes, and snippets.

@nncl
Created July 5, 2016 15:59
Show Gist options
  • Save nncl/5e365eeaab98d71a7ba4438f1223ba42 to your computer and use it in GitHub Desktop.
Save nncl/5e365eeaab98d71a7ba4438f1223ba42 to your computer and use it in GitHub Desktop.

Instagram API

Some stuff from their API.

Get User Information

1 - You have to unblock the public_content. To do that:

https://www.instagram.com/oauth/authorize?client_id=b23670e258o0fmk334jfu287c9f9953&redirect_uri=http://127.0.0.1:5000&response_type=code&scope=basic+public_content+follower_list+comments+relationships+likes

Simply add scope parameters at the end of the URL:

&scope=basic+public_content+follower_list+comments+relationships+likes

2 - Now, generate your Access Token:

https://instagram.com/oauth/authorize/?client_id=[CLIENT_ID_HERE]&redirect_uri=http://localhost&response_type=token

3 - And then, you can get the users's information:

https://api.instagram.com/v1/users/search?q=<USERNAME>&client_id=<CLIENT_ID>&access_token=<ACCESS_TOKEN>

4 - Users' media

https://api.instagram.com/v1/users/<USER-ID>/media/recent/?access_token=<ACCESS-TOKEN>&count=<COUNT>&callback=?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment