How to register new client on Instagram API

16,330

Solution 1

You can 'play around' without a website. Dikei's answer is technically correct, however you can put any return URL you want if you know what you are looking for.

If you were to put http://www.google.com as your return URI, and then from a signed in account visited this
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=http://www.google.com&response_type=code

with CLIENT-ID replaced by your application ID, then you would receive an authorize request form instagram for your account. Once you accept you will be returned to Google with a query string attached which would look something like this: http://www.google.com?code=AABSDAKJHSF1283789012ASDBALKSD

That code in the query string (for a short time-frame after the authorisation) can be used with to get an authorisation token for that user. With that you can then run any of the other fun things in the API.

That's the trick around not having a return URL, and the rest is all here: http://instagram.com/developer/authentication/

Solution 2

Instagram API requires a website. The flow is

  1. You direct the user to Instagram website to authenticate.
  2. Instagram redirect the user back to your redirect_uri with the necessary data to get an access token
  3. You get the access token, then use it to request the user's data

For development, you can use http://localhost as the website address, the redirect_uri depends on the structure of your website.

Share:
16,330
amb1s1
Author by

amb1s1

Updated on June 07, 2022

Comments

  • amb1s1
    amb1s1 about 2 years

    Hi I'm trying to create a new client_ID, but I don't have a website. I want a client_id, for learning purpose. When I try to create a new client, I get ask the following: Application Name: amb1s1_test Description: Learning how to use instagram with python

    website: (Don't know what to use since I will be using my home computer to use the intagram python api)

    OAuth redirect_uri: (I have no idea)

    Thanks

  • amb1s1
    amb1s1 over 11 years
    I'm still confuse about the redirect_uri. What do I use there? Can you give an example? I read the doc, but still not clear.
  • Kien Truong
    Kien Truong over 11 years
    redirect_uri is an url in your website. Instagram redirect your user to this url after authentication is completed.
  • amb1s1
    amb1s1 over 11 years
    So I can't do it without a website?