Will access token expired?

Solved
Highlighted
Shopify Partner
5 0 0

I have request an access token and saved it in my database so all my apps can use it. It works on that day but on the next day my app start getting 401 error saying my token is not valid. It works again after I make a OAuth request and update the token on my database.

 

In the documentation it seems access token is permanent, but none of it explicitly state that. Is access token permanent or will it expired? If it expired, what is the duration of the token?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
619 48 94

This is an accepted solution.

Hi @alcfy,

 

Offline access tokens don't expire unless your app is uninstalled or you revoke the access token. Online access tokens on the other hand, only last as long as the user's admin session. You can read about the different access modes here.

 

Can you check which mode you are using?

0 Likes
Highlighted
Shopify Partner
5 0 0

It does seems my token is online access token, thanks for the info. Would appreciate if it is mentioned in the OAuth doc

0 Likes
Highlighted
Tourist
19 0 0

Hi,

 

How can I revoke access token?

 

Thanks,

Sourav

0 Likes