Live data from Hacker News

Ask HN: Does anyone else have problems with Instagram API OAuth2?

news.ycombinator.com

41–50 of 82 posts

Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?

#41
I have just tried different environments we have with different users that were consistently failing last week (even this morning) and I have been able to get an access token using the server approach. Can anybody else test with their apps if the problem is fixed for you? Fingers crossed.

Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?

#42

To temporary fix the issue, you could do the following: change response_type=code to response_type=token. Instagram will redirect back to your site with something like /callback#access_token=123456. From here, send the user to a very simple page with the following snippet: if (window.location.hash && window.location.hash.indexOf('#access_token=') !== -1) { var accessToken = window.location.hash.replace('#access_token…

This solution is insecure. Any person can intercept token and make harm to your application.

It doesn't seem too bad when enforcing https (using the return address whitelisting in the developer console). Am I missing something?

Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?

#43

In our case, it seems that most of our customer facing this issue is using business profile, any others checked this?

Not my case, I am having some problems with "normal" user accounts. Currently, it seems that logging out and login again fixes the issue.

Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?

#45
post #42

Earlier quoted context omitted.

This solution is insecure. Any person can intercept token and make harm to your application.

It doesn't seem too bad when enforcing https (using the return address whitelisting in the developer console). Am I missing something?

Customer will see token anyway

Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?

#46

To temporary fix the issue, you could do the following: change response_type=code to response_type=token. Instagram will redirect back to your site with something like /callback#access_token=123456. From here, send the user to a very simple page with the following snippet: if (window.location.hash && window.location.hash.indexOf('#access_token=') !== -1) { var accessToken = window.location.hash.replace('#access_token…

Thanks for this temporary fix. Going to use it until Instagram fixes their issue with the authorization code.

Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?

#47
post #42

Earlier quoted context omitted.

It doesn't seem too bad when enforcing https (using the return address whitelisting in the developer console). Am I missing something?

Customer will see token anyway

Ah yes, of course. I did miss that. The implicit (client-side) auth flow gets the access token directly and doesn't need another request to the API, that's the whole point.

This is indeed rather unwanted, even more so with the new more restrictive API usage policy and the sandbox.

Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?

#48
We started having same issue since last Friday (Dec. 15, 2016) after working fine for months. Same user can login via oauth on one wifi, but not on the other, or even on mobile cellular network. And even when it worked on that wifi at one point, it does not work at other times. We have not found a workaround to fix this, reported to Instagram 24 hours ago, waiting...I tried to login to my account on instagram.com first, then go back to our site, browser would log in automatically. So far, we don't have a solution yet.
Post reply on HN