问题
I am seeing this error from my live server using the Instagram API.
{
"error_message": "Matching code was not found or was already used."
, "code": 400
, "error_type": "OAuthException"
}
I have read a few suggestion on here to clear cache but that isn't fixing the issue. I am also unable to submit a support ticket directly on the Instagram site as I am receiving an error message while attempting to submit a ticket.
回答1:
I was also facing the same problem. I have tried all the solutions available on the SO. But it didn't work.
When I debugged the that Instagram code
in details, I found that Instagram was providing the code
something like this after authorization -
AQAbo7gLQMVRqC4NitrEGSj6tPa8UBREsSYDAL7IZcthASbSKaJANrry3HgQnofJuY4nJx9NTuo_eO4SV8ol4-olk0Y4NzhbXkxTw8G9dBq-T3uZuBzRIVJd61LsYHq15tIeDswI82ri6lt7ngc76eoAAAypgGc3cq9DqayVb7oCpfWZEym6KPH_hJMVaoUOAjN9OT1EEtYuUhmUFgJHHEy66ab9LgHZLXiFxugYBkrdKw#_
It started working when I removed the ending 2 charaters #_
from the code
.
Below is the final code
that I used to get the access_token
-
AQAbo7gLQMVRqC4NitrEGSj6tPa8UBREsSYDAL7IZcthASbSKaJANrry3HgQnofJuY4nJx9NTuo_eO4SV8ol4-olk0Y4NzhbXkxTw8G9dBq-T3uZuBzRIVJd61LsYHq15tIeDswI82ri6lt7ngc76eoAAAypgGc3cq9DqayVb7oCpfWZEym6KPH_hJMVaoUOAjN9OT1EEtYuUhmUFgJHHEy66ab9LgHZLXiFxugYBkrdKw
This was a simple solution in my case.
I hope this will help people in case they are still facing this issue.
来源:https://stackoverflow.com/questions/41240049/instagram-oauth-api-gives-error-message-matching-code-was-not-found-or-was