How to authenticate instagram without URL redirection? no server

I am trying to write client-side authentication for instagram, but I want to do this without uri redirection, I will not host the server.

https://instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token

dev api claims this is an implicit way however i cannot find a solution

+6
source share
2 answers

Short answer: you cannot do without uri redirection.

This is how OAuth works. You need at least uri to get an access token. Uri can be hosted locally using a simple web server.

0
source

Follow Client (Implicit) Authentication . Use the credentials from an application registered on the Instagram developer portal. Therefore, change the CLIENT-ID and REDIRECT-URI from this URL to the credentials of the registered application.

From your application, send the user to this link. If they agree, they will be redirected to uri redirection (which should be somewhere in your application). They are redirected to the page, the page will contain a hash containing the acces token.

Get this from the url and use it to request data from instagram api. You will need jsonp for requests. See the example in action in a similar thread

-1
source

All Articles