Comments (4)
Dear Team,
I am trying to install our public app on a Shopify store and the code returned including the redirect URL is used for generating the access token.
But our repeated call to generate 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 twice with the Shopify store owner, installing, uninstalling and reinstalling, 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
from shopifysharp.
Hi @sharad225, this error means that the code
value in the querystring that you get when a user is redirected back to your site has already been used when you're trying to create an access token. In many cases it's because a user accidentally refreshed the page or the page was reloaded in some way that made the operation repeat. I'd also try to step through all of your code that gets run after the user gets redirected back to your site to make sure it's not accidentally being run more than once.
from shopifysharp.
Hi Nozzlegear, Thank you for your response and for looking into this.
Let me explain:
As soon as the Shopify show onwer clicks to accept the installation of our app, he gets redirected to the following URL:
http://mywebsite.com/?code=d119551fb7cdd820012c6b2cb7b12495&hmac=10976937c09a1f1e3db6275d12cae8fbd43415a6d5b031ec14a70128b8fe9dfe&shop=<shopifysite>.myshopify.com&state=11122777×tamp=1478065253
mywebiste.com
is our website which integrates with the Shopify Shop accessing various APIs through the access token and <shopifysite>.myshopify.com
is the actual Shopify Shop.
This redirected URL is being provided to us by the Shopify Shop owner in an email.
This URL contains the code
parameter. We take this code
parameter and hit another Shopify API for generating the access token - using the following URL:
https://<shopifysite>.myshopify.com/admin/oauth/access_token
and pass the following 3 POST parameters : client_id, client_secret and code
We haven't yet written the code for the creation of access token, instead we do this process of generating the access token through POSTMAN, which is a manual process. We are planning to write the script which will automatically parse the redirected URL and generate the access token, but as of now we are doing this manually.
Let me know any other details you will require and I will provide it.
Regards,
Sharad
from shopifysharp.
Hi Nozzlegear,
Any feedback sir?
We really need some help here. I would really appreciate it.
Regards,
Sharad
from shopifysharp.
Related Issues (20)
- Adding delay and time buffer to requests to accommodate API Throttling HOT 1
- How to know the delivery type of a certain Shopify order?
- .Net standard support HOT 19
- Remove fulfillment
- SmartCollectionRules: Add ConditionObjectId Property HOT 2
- Extending Orders for CustomerJourneySummary? HOT 6
- Generic ListFilter issue HOT 1
- "SmartRetryExecutionPolicy" has this been deprecated HOT 1
- FulfillmentService function not working after update to latest version ! HOT 3
- Search product by part of title HOT 4
- Support Storefront-Access-Token for GraphQL HOT 3
- Shipping Line ID (missing property) HOT 2
- Shopify issues HOT 1
- Neither fulfillments nor tracking works in current version
- Listing products in English HOT 9
- Unable to create a new product (deserialization error with object not found) HOT 14
- Split readme documentation into Wiki Docs HOT 2
- How to use an offline token? HOT 2
- How can I get the 'current_quantity' of 'line_items' from Order HOT 3
- Is there any way to use ShopifySharp to create Theme App Extensions HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shopifysharp.