Problem access token - authorization code

Solved
YoussefAfla
Shopify Partner
8 0 3

Hello,

I want to make a new application work in the background
so I want to add a new order information to Shopify just from my website

but I have a problem in the authorization code

I have this error message 'The authorization code was not found or was already used'

I am building my app like this one tutorial https://help.shopify.com/en/api/tutorials/build-a-shopify-app-with-node-and-express

so I don't know how I can do that

I need something like how I can get the  accessTokenPayload without authorization code
Or how I can get a fixed authorization code

Or how do I run my application on the background without logging in merchants to his store

because the website will be used just by users

 

Thank you for helping me :)

0 Likes
SBD_
Shopify Staff
Shopify Staff
1089 147 199

This is an accepted solution.

Hey @YoussefAfla,

 

It sounds like you're after offline access: https://help.shopify.com/en/api/getting-started/authentication/oauth/api-access-modes

 

Offline access tokens are meant for long term access to the store, when no user interaction is involved. This kind of access token is ideal for background work in response to webhooks, or for maintenance work in backgrounded jobs.

chenster
Pathfinder
104 4 10

I too was stuck on this problem. Thanks to your reply. So basically one needs to store access token offline, which means in a database table, for later used by non-user interactions such as webhooks.

Cartoo
0 Likes