Instagram API: how can I use multiple redirect_uris for one application?

I am very familiar with OAuth 2 for other providers, but have not previously used it for Instagram.

Like many developers, I have several domains in which my application can run, for example:

http://www.foo.com/oauth2callback https://www.foo.com/oauth2callback http://localhost:3000/oauth2callback https://localhost:3000/oauth2callback 

Other OAuth 2 Providers I used, for example, Google, several entries in the redirect_uris parameter .

However, Instagram Only allows you to allow a single redirect URI parameter for a registered application .

Can I have multiple redirect URIs for one Instagram application or do I need to register multiple applications, each with a different redirect URI?

+8
instagram
source share
3 answers

It looks like you can now set multiple redirect URLs when registering / changing the client on Instagram:

screenshot

+4
source share

With the Instagram apps I created, I created a separate app for each place I want to redirect to, although I did not discriminate against ssl. Then I load the api credentials into the application based on the environment in which it is running.

This is a pain you must do, as Instagram also limits you to 5 registered apps per account. It would be useful to be able to register multiple redirects for this reason. But, on the other hand, it would be just as good for me that I was not limited to the number of applications you can create (I have more Twitter applications than I even remember that I created!).

+6
source share

I think this is one of those scenarios that you feel again in Atari.

Anyway, I found it helpful to do this:

edit the hosts file (on unix based OS: / etc / hosts)

make sure you add the following line:

127.0.0.1 registeredomain.com

Where registereddomain.com is the domain you have on instagram as the lesson you are returning.

Thus, your application will return uri to registeredomain.com, which is equivalent to the local host on your local computer, accepting the login.

btw: why? What for? What for? why Instagram, why should you force one uri return? any reason for this?

0
source share

All Articles