Instagram oAuth returning “No matching code found”

2019-01-26 07:35发布

I'm currently receiving

{"code": 400, "error_type": "OAuthException", "error_message": "No matching code found."} 

while attempting to get a user's access token on one of our servers. This is occurring while using the REST Client Chrome extension and from our web application, on one particular server.

I am able to receive the user's access token from my local machine and a different server using the same code and extension.

Could our IP have been blacklisted from receiving access tokens? Has anyone else run into this issue?

Thanks,

EDIT

Heard back from Instagram support, this was an issue on their end and has been fixed. Thanks for the help.

3条回答
看我几分像从前
2楼-- · 2019-01-26 08:24

I was having the same trouble: users couldn't authenticate through Instagram and the error returned was "OAuthException" and "No matching code found." Started on 4/28/15 but didn't catch until two days later. Only in production, not staging, so it was almost certainly IP.

I posted to the Instagram developer help center (https://help.instagram.com/contact/438525166257277) yesterday at 7pm and the problem was fixed by this morning, with a cryptic email from their support at 11am ("The issue has been resolved").

查看更多
冷血范
3楼-- · 2019-01-26 08:27

Yes your intuition is correct. It is likely that you made too many incorrect API calls that Instagram disabled your IP. I started dealing with Instagram API this week, at the beginning it was working but today I started getting the same error you got. The code also works fine locally or on any other machine. The only explanation to this is that my IP is blocked. Just switch your IP and you should be fine!

查看更多
欢心
4楼-- · 2019-01-26 08:33

SOLVED: The reason for this error is the ip address from which you are trying to connect to Instagram and get access_token. After contacting my network provider and changing my ip everything got fixed.

To figure out if your issue is caused by your local ip (not the server ip) try to connect to your app via mobile network or any other network different from yours: - If it works you need to change your local ip. -If it does not work - change your server ip cause it is probably banned by instagram for lots of malicious requests.

查看更多
登录 后发表回答