Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instagram returning "Matching code was not found or was already used" when using OAuth

I am trying to use the Instagram OAuth using the developer documentation at

https://www.instagram.com/developer/authentication/.

Step 1 and 2 are working without any problems, so I have my Client-ID, the Client-Secret, the Redirect-URI and the code.

But every-time I am trying to get the Acces Token I get the following error:

{ "code": 400,  "error_type": "OAuthException",  "error_message": "Matching code was not found or was already used." } 

Any tips how to solve this?

like image 936
sma Avatar asked Jul 08 '16 09:07

sma


People also ask

What is OAuth Instagram?

This endpoint returns the Authorization Window, which app users can use to authenticate their identity and grant your app permissions and short-lived Instagram User Access Tokens.

What is my access token Instagram?

Access Token is an opaque string that identifies a user, app, or page. It can be used by the app to make graph API calls and is unique to each user. Instagram Access Token is essential for the usage of most Instagram based apps.


2 Answers

We are experiencing the same issue. It appears that logging out of Instagram, then attempting to use Instagram OAuth through our site after we are logged out of Instagram is a workaround.

like image 170
Cliff Avatar answered Sep 21 '22 15:09

Cliff


We're experiencing the same issue since yesterday (after months of working fine) - have reported it as an issue yesterday via the 'Report Issue' function on https://www.instagram.com/developer/clients/manage/ and I'd encourage you to do the same.

Yet to hear back, but seems likely it's their end having issues rather than something we're doing.

EDIT: It's also working fine for us on our development servers (which use different IPs for interacting with IG's API) but not working on our production server from any of the IPs we have available on the production server.

EDIT2: (July 2016) Just tested and it's mysteriously started working again on our production servers. No reply to the support ticket from Instagram as yet.

EDIT3: (December 2016) And now it's failing again with the same message... Seems like it's Instagram's end again. Nothing much we can do. Frustrating.

like image 24
scp Avatar answered Sep 21 '22 15:09

scp