jxe
jxe

Reputation: 310

Instagram API error code 400 “No matching code found”

$config = array(
                        'client_id' => '****',
                        'client_secret' => '****',
                        'grant_type' => 'authorization_code',
                        'redirect_uri' => 'https://example.com/order/',
                    'code' => $code,
                );

Since about 5-6 hours I'm getting this message when trying to authenticate:

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

Nothing has been change on the site and everything seems to be ok with the client. Does anyone have a clue about what may cause this?

Everything is working on our dev site, the only difference is that is uses an other client id. I have tried to create a new Instagram client and tested with the new client id, but no difference on the live site.

Upvotes: 0

Views: 3069

Answers (2)

MVS
MVS

Reputation: 36

In my case I was initiating Instagram connection from page A and callback URL was different (Page B). Once I made sure that callback URL is the same from where I was initiating, this problem solved for me.

Upvotes: 0

jxe
jxe

Reputation: 310

I received an answer from Instagram today regarding this. Yet no information about the cause of the problem. But the problem is solved by them and in our case the old IP works again.

I have asked for some further details, so if I get any more information, I'll share it here.

Upvotes: 1

Related Questions