What do I do if the online access token gets expired while a user is interacting with the app?

New Member
2 0 0


The above documentation says the online access token is meant to be used when a user is interacting with the app. But what if the token is expired during the use of the app? Suppose the app redirects the user to OAuth flow and gets the token and redirects the user to the origin again, but isn't it a bad user experience?

Replies 3 (3)
9 0 2


the documentation also says:

[...] where the access token's lifespan matches the lifespan of the user's web session.

So I would expect that the access token will not expire as long as the user is interacting with your app and the Shopify session is active.

If you have an embedded app another way is using the session token. In that case, you only use the OAuth authentication after the first install or permission scope changes.



MRG @ Cartbear
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
New Member
2 0 0

How does Shopify know the lifetime of the user's web session? Isn't the expiration date pre-determined when the app obtains the online access token after the OAuth flow?

New Member
3 0 0

Not only that, redirecting to the authorization page also does not work, has anyone encountered this problem?