question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Oauth error invalid_request: The authorization code was not found or was already used

See original GitHub issue

Hi,

I am trying to install our public app on a Shopify store and the code returned in the redirect URL is used for generating the access token. But our call to Shopify API for generating access token is always resulting in the following error: “oauth error invalid request the authorization code was not found or already used”

We did this exercise of installing, uninstalling and reinstalling with our Shopify store owner, but kept getting the same error. How do we get this error resolved and be able to generate the Shopify access token? Please help.

Regards, Sharad

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sharad225commented, Mar 17, 2017

Hello to all who contributed here! With all those inputs I understood that the problem might be that the generated code is being used before actually being used for generating the access token. I called my customer and asked him to share screen to see he is not doing anything which is making the code getting used before we get to use it.

He installed our app and then he pressed the browser back button and then I realised this action of his is actually making the code go back to his store and in turn getting used and this is what the error said when we tried to use it for generating the access token. I stopped him from hitting the browser back button and asked him to send over the code to us. We hit the access token generating API and we got the access token.

Thanks to all who helped me see into the problem and helped me in resolution.

Kind Regards, sharad

0reactions
hashheshcommented, May 30, 2022

Hello to all who contributed here! With all those inputs I understood that the problem might be that the generated code is being used before actually being used for generating the access token. I called my customer and asked him to share screen to see he is not doing anything which is making the code getting used before we get to use it.

He installed our app and then he pressed the browser back button and then I realised this action of his is actually making the code go back to his store and in turn getting used and this is what the error said when we tried to use it for generating the access token. I stopped him from hitting the browser back button and asked him to send over the code to us. We hit the access token generating API and we got the access token.

Thanks to all who helped me see into the problem and helped me in resolution.

Kind Regards, sharad

@sharad225 , many thanks sharad, this explanation helped a lot

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oauth error invalid_request: The authorization code was ...
currently I'm using access Token from the app to connect to shopify. is any refresh token available to refresh the token.
Read more >
The authorization code was not found or was already used
I'm immediately trying to exchange an access code for an authorization token, but it fails. And there's no clear reason why.
Read more >
Authorization Errors | Device Access
When attempting to get an access or refresh token, you will get an "Invalid client" error if you provide an incorrect OAuth 2.0...
Read more >
Using Auth0 Social Connect with Shopify : Oauth error ...
... to shopify using postman it show following error: Oauth error invalid_request: The authorization code was not found or was already used.
Read more >
"Invalid request : token created error: Save Access ...
Hello! Zoom Apps Configuration We have a React app using these scopes and events: ['authorize', 'getUserContext', 'onAuthorized', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found