Token Expiry FAQ

Since there are many questions about the token expiry requirement spread across many threads I thought it would be useful to bring many of them together here in one consolidated FAQ. As more questions are asked I’ll update this post to include more answers.

Deadlines and scope

What happens on each date?

Date Consequence for non-compliant public apps
January 1, 2027 App Store delisting and blocked new installs. Existing installations can continue affected API requests.
January 15, 2027 Merchant warnings in Shopify admin.
April 1, 2027 Affected Admin API requests using non-expiring offline tokens return HTTP 403.

January 1 remains the migration deadline. April 1 is the API rejection milestone. The earlier requirement for public apps created on or after April 1, 2026 remains in effect.

Which apps and APIs are affected?

The requirement covers public apps using legacy non-expiring offline tokens with GraphQL or REST Admin APIs. Custom apps, merchant-created apps, and online access tokens are outside this migration mandate. Payments Apps API traffic is not subject to the requirement.

How does Shopify detect non-expiring token usage, and why can the warning remain after migration?

Shopify checks the token presented on an Admin API request. Detection is based on using the token, rather than simply holding an unused token. A rejected request can also count as detected usage.

Those request events are aggregated by app for Dev Dashboard. The warning considers usage in the preceding 14 days, so historical usage can remain visible after you migrate.

If you believe your app has fully migrated but are still seeing alerts, check old workers, queued jobs, and infrequent tasks that may still send a legacy token. Acquiring an expiring offline access token through any method does not itself clear earlier usage or show that every request has switched.

I received an email about non-expiring tokens but I don’t see any alerts in the Dev Dashboard

Shopify periodically sends emails to partners that have apps with active non-expiring offline access tokens. If these access tokens have not been used in the last 14 days there will not be an alert in the Dev Dashboard. However, the tokens represent a latent risk to the app because they could be used to make API requests, trigger an alert, and cause the app to be non-compliant with the expiring token policy.

Choosing a token flow

Do I have to use refresh tokens, or can I use application-only access permanently?

Application-only access is a supported long-term acquisition method using the client credentials grant with a signed client assertion. It returns a short-lived offline access token, without a refresh token. Token exchange and the authorization code grant can instead return an expiring offline access token paired with a refresh token. Choose the acquisition and renewal flow that fits the workload.

Which tokens should I use for background jobs versus interactive staff actions?

Use offline access tokens for work performed on the app’s authority, regardless of acquisition method. Use online tokens when a request must respect the signed-in staff member’s permissions. An offline token does not become staff-scoped because the request originated in your UI. See access token types for more details about the different tokens apps can use.

How long do tokens last?

The time to live (TTL) of tokens varies based on the token type and token acquisition method.

Token Acquisition method / context TTL Renewal
Offline access token Token exchange or authorization code grant, requesting expiry 1 hour Use the refresh token
Offline access token Application-only access; for public apps Up to 1 hour Repeat acquisition; no refresh token
Offline access token Client credentials grant with a client secret, or application-only access without public distribution; app and store must be in the same organization 24 hours Repeat acquisition; no refresh token
Refresh token Returned with an expiring offline access token 90 days when issued; can retire earlier Successful refresh returns a new pair
Online access token User-associated token exchange or authorization code grant 24 hours or user logout, whichever comes first Acquire again with a user session
Delegate access token Derived from a parent offline access token Parent’s remaining lifetime, or a shorter requested TTL Acquire another delegate
Legacy non-expiring offline access token Earlier offline acquisition without expiry No time-based expiry Subject to revocation and the enforcement schedule above

Use expires_in for the access token’s TTL, and refresh_token_expires_in for the refresh token’s TTL when one is returned.

Does using application-only access invalidate my existing tokens?

No. Application-only access does not retire legacy offline tokens or offline access-token/refresh-token pairs. Token exchange, authorization code acquisition, and refresh also do not retire offline access tokens acquired through application-only access. Multiple offline access tokens acquired this way can remain valid together. Continued affected legacy-token use still leaves the app incompletely migrated.

When does direct migration invalidate the old non-expiring token?

The successful direct exchange invalidates the legacy token immediately. Do not keep using it until the first refresh. Its narrowly supported reuse for migration-response recovery does not restore it as an API credential.

Can separate workers, regions, or customer connections have independent refresh-token families?

The offline flow that returns an access-token/refresh-token pair does not provide independent refreshable families per connection for one app/store. Coordinate acquisition and refresh through shared credential ownership. Application-only access supports overlapping short-lived offline access tokens and may fit independent workers, but those tokens still carry the installation’s app authority; they do not create separate merchant grants or staff identities.

Can I prevent my app from acquiring or using non-expiring offline tokens?

Yes, you can enable the expiring tokens only setting in your app’s Settings, under Admin API token expiry.

Enabling it prevents your app from using non-expiring tokens to make Admin API requests.

Before enabling the setting, make sure to:

  1. Migrate and test every request path, including background workers, queued jobs, and infrequent tasks.
  2. Check your Dev Dashboard logs for remaining non-expiring token use.

Once the setting takes effect, any remaining legacy requests that still use a non-expiring token will fail.

Migrating existing installations

Do merchants need to reopen or reinstall the app to migrate?

No, you do not need to wait for merchants to open your app to migrate old non-expiring tokens. Follow the instructions for migrating without a user session.

Does turning on the SDK/template option migrate every stored token?

Changing acquisition configuration does not convert credentials already stored in your database. Update new token acquisitions to request expiring tokens, then migrate existing installations and update background workers. For direct OAuth/token-exchange implementations, request expiring=1; follow your framework’s configuration instructions.

Can I migrate in batches?

Yes, it’s safe to design your application rollout around individual stored installations. Deploy support for both credential states first, exchange a small cohort, persist the returned pair and expiry information together, and verify real API and background-job behavior before expanding. This is a recommended rollout approach, rather than a promise that every SDK provides batch orchestration. Ensure that you account for concurrent workers and apps that acquire tokens whenever they are opened by the merchant in admin.

What if the migration response is lost or my database write fails?

Retry the same direct migration request with the original legacy token and a valid client ID and client secret within seven days. An eligible retry returns the original pair; recovery ends sooner if that pair is refreshed or superseded by later acquisition.

Refresh, dormant stores, and recovery

Must I refresh every hour for every store, even when there is no work?

No. An unused expiring access token will expire based on its TTL. Refresh when API work resumes while its refresh token is valid. If you rely on refresh tokens, schedule maintenance before their expiry for dormant installations; alternatively implement application-only access where eligible. Receiving a webhook does not itself renew credentials.

What happens to tokens while a store is frozen, including seasonal stores frozen for months?

Apps can refresh expiring offline tokens while a store is frozen. Keep refreshing before the current refresh token expires; freezing does not give you an indefinite credential lifetime. Successful refresh issues a new refresh token with a new 90-day lifetime, without requiring the merchant to reopen the app. You do not need to refresh every hour when there is no API work.

Admin API requests to a frozen store can return HTTP 402 Payment Required. That is a store-state restriction; acquiring or refreshing a token does not unfreeze the store. Pause affected data jobs while retaining credential maintenance. For an unpaid-balance freeze, the merchant must resolve the outstanding payment in admin. See response-code reference for details of this error.

What retires the previous refresh token?

For the normal expiring offline refresh flow, the previous refresh token remains usable until the earliest of:

  • Use of its replacement refresh token.
  • The 30-day limit measured from its first refresh use.
  • Its original expiry (90 days from issuance).

New offline acquisition through token exchange or the authorization code grant immediately retires all other refresh tokens for that app and store. Using the replacement access token is not the acknowledgement that retires the preceding refresh token. See our dev docs for more details on refresh, rotation, and revocation.

What should I do if a refresh response is lost?

Retry promptly with the last stored refresh token while it remains eligible. Persist the returned access token, refresh token, and expiry dates atomically, then use the newest refresh token.

Can I restore an old database backup and use any refresh token saved there?

You can use a refresh token from a backup if it is still valid. If it has expired or been retired by later refreshes or token acquisition, you can regain access through application-only access when the app remains installed and signing-key authentication is configured. Otherwise, the merchant may need to reopen the app and complete authorization. The 30-day refresh recovery period helps with lost refresh responses; it does not restore tokens that have already been retired.

Application-only access and signing keys

What do I need to set up application-only access?

Follow our setup guide for complete details. Generate a signing key pair, register the public JWK in Dev Dashboard, and implement signed client assertions and token acquisition in your backend. Retain the private key securely. Follow the tutorial for supported algorithms, claims, and request format.

Can I request narrower scopes with application-only access?

No. This flow uses the installation’s granted scopes; the request’s scope parameter is ignored. It does not grant scopes the merchant declined or revoked. Use the returned scope information when checking what access is available.

How should I renew offline access tokens acquired through application-only access?

Cache by store, use the response expiry, and acquire again before expiry when needed. Add jitter and transient-error backoff. There is no refresh token for this flow; acquiring another offline access token through the same method does not revoke the still-valid one.

How do key rotation and revocation affect issued tokens?

Adding a replacement public key lets you move signing to the new key before revoking the old one. Revocation causes assertions and offline access tokens tied to that key to be rejected shortly afterward. Client-secret rotation does not revoke offline access tokens acquired through application-only access; public-key revocation does not revoke tokens issued with the other key or the client secret.

Short access-token lifetime limits a leaked access token. A stolen private key can keep obtaining tokens until its public key is revoked.

Is the Dashboard’s “rotation refresh token” a backup for a store’s OAuth refresh token?

No. It belongs to the client-secret rotation workflow. It is not a recovery credential for a store’s expired or retired refresh token.

You cannot actually be serious about this. The number of stores referenced in the email bears no relationship to what actually appears in the Dev Dashboard.

Are you saying if an app that has migrated all active stores and accidentally makes a single call after January 1st (because a dead or dormant store was unexpectedly reactivated) will be delisted? Just make the token stop working. An app shouldn’t be penalized for one mistake if 99% are going through fine.

What’s the chance that a competitor installs an app on his own store and then triggers an expired offline token to delist the competition automatically?

I completely agree with this point. If a store is inactive and an old non-expiring token request is detected, Shopify should ignore it for warnings and delisting scenarios. This would make things much easier for everyone. :+1:

Also, if I’m not wrong, based on what I understood from the migration email, “Complete your migration to expiring offline access tokens”, I think they are counting the “tokens to migrate” based on the unsuccessful requests to exchange non-expiring tokens for expiring tokens. Most of them are closed stores. I’ve also compared that count with the number of closed stores across my apps, but the numbers don’t match either. So this is count is only Shopify knows.

I’m also ignoring the email for now because we don’t see any warnings in the Dev Dashboard, and I’m unable to figure out the counts or understand the whole email properly.

One more thing, when will Shopify allow us to migrate frozen stores? I’ve migrated almost 5 apps to expiring access tokens, but in all these apps, I’m unable to get a new pair of tokens for frozen stores. Is this something new, especially with so many changes coming every day? :sweat_smile:

What are the chances that a competitor could install an app on their own store and then deliberately trigger an expired offline token to automatically delist competing apps?

How would that even work? Once you migrate, before making any Admin API request, you should check whether the store still has a legacy token. If it does, migrate it to an expiring offline token first, and only then proceed with the API request.

You can also run a migration script to identify stores that are closed or frozen and flag them. When those stores reopen and the merchant accesses the app, the authentication flow should automatically handle the migration and obtain the new token pair before making any Admin API requests.

Am I missing something here? I’m currently in the middle of migrating our app to expiring tokens, and so far I don’t see this being an issue.

For our other backend services, I’m planning to use application-only access tokens, while the app’s admin portal will continue using expiring offline tokens. This way, independent backend services can acquire their own tokens without interfering with the admin portal’s refresh token flow.

The only additional thing I need is a cron job to ensure refresh tokens never expire. I’ll refresh them 7 days before their expiry.

I genuinely don’t see how a competitor could exploit this to deliberately delist another app. Am I overlooking something?

Correct, this is the best practice. The app should not use an old non-expiring token if it’s still holding one. If an inactive installation re-activates the should exchange the old non-expiring token before making an Admin API request and never after making an Admin API request (which will fail starting April 1, 2027).

There are other ways to avoid this situation:

  • Apps can exchange all of their old non-expiring tokens for new expiring tokens and refresh tokens without merchant involvement using this approach. Once this process completes the app won’t be in possession of any non-expiring tokens.
  • Apps can use application-only acquisition and always acquire expiring tokens. The old non-expiring tokens then are never used by the app.
  • Apps with interactive experience in the Admin can use online access tokens instead of offline access tokens. Online access tokens have always had an expiry set on them, unlike offline access tokens.

No. The de-listing process will not happen automatically because a partner who acted in good faith to migrate their app accidentally had a single API request. We’re not aiming to play gotcha with the partner community or punitively remove apps that have a single non-compliant request but otherwise have completed the migration.

Shopify will apply our discretion in making determinations about compliance or lack thereof. We have the data to observe the difference between an app that has effectively completed the migration and has an accidental usage of a non-expiring token vs. an app that is not complying with the migration timeline.

That all being said the best practice is for apps to fully migrate, exchange old non-expiring tokens, and defensively avoid ever using non-expiring tokens (i.e. always exchange them before making API requests and never after making API requests).

Thank you for recognizing that these are apps are important to our mutual clients and are also important to the livelihoods of many hard-working people and their employees who are trying to do the right thing.

Hi @TerenceShopify, I have a question about parallel token refreshes. Please let me know if this has already been addressed, or if I’m missing some info about how refresh tokens behave.

My app makes many concurrent requests to the Admin API for the same store, so multiple processes will sometimes detect at the same moment that the token needs refreshing and try to refresh it concurrently.

If requests A and B run at the same time and both try to refresh the expiring token, could either of these situations happen?:

  1. Request A refreshes the token, and request B refreshes it again immediately afterward. Process A is left holding an invalidated access token and refresh token, so its subsequent Admin API calls fail.
  2. Request A refreshes the token first, and request B then tries to refresh using the old refresh token. B’s refresh fails because that token was already invalidated by A’s refresh.

If so, does this mean we need to implement locking around token refreshes on our side? That gets more complicated when our app runs across multiple nodes, since the lock would need to be distributed (e.g. via Redis or the database).

Is there a grace period during which the previous refresh token or access token remains valid after a refresh? That would avoid most of these race conditions.

Please let me know if I’m missing something about how parallel refreshes are handled.

Thanks in advance!

Residual non-expiring tokens after ID-token exchange: do they count?

Our public app (hosted on Gadget) received the “You have 11 tokens to migrate” email
on October 29. Our situation:

  • Every installed store holds an expiring offline token and a refresh token, renewed
    regularly.
  • The app makes no API calls with non-expiring tokens, and the “Deprecated offline
    token” warning is gone from the Dev Dashboard.
  • Most stores moved to expiring tokens through ID-token exchange when the merchant
    opened the app. That exchange doesn’t revoke the previous non-expiring token, and
    we no longer have its value, so we can’t run the direct migration exchange on it.
  • Two stores are frozen (402) and still have the app installed with a non-expiring
    token that was never migrated.

Partner support confirmed the docs don’t cover this case and pointed us here.

  1. Do non-expiring tokens that were replaced by an expiring pair through ID-token
    exchange (unused, and no longer held by the app) count toward the January 1
    compliance determination?
  2. Do the non-expiring tokens of frozen stores count?
  3. If either does, is revoking the client secret (after moving the expiring pairs to
    the new secret) the expected way to retire them, or can Shopify retire them on its
    side?

Happy to share our client_id by DM.

Three questions from a public app finishing its migration (token exchange for the embedded admin, application-only access tokens for webhooks and background jobs, then a direct migration sweep for the remaining stored tokens).

  1. Application-only access tokens: rate limit and store-state responses
    Is there a rate limit on POST /admin/oauth/access_token with grant_type=client_credentials and a JWT client assertion (per app, per store, or per minute)? And what does that grant return for a store that has uninstalled the app, as opposed to a frozen store (402), a locked store (423) or a closed store? We have seen one report of 400 app_not_installed for a closed store and 401 invalid_client as the general rejection, but nothing documented for the plain uninstall case. We want to classify these responses correctly so we never retry a dead store in a loop.

  2. Non-expiring tokens left behind by an ID-token exchange (seconding post #12)
    When a store moves to an expiring pair through token exchange with an ID token, the earlier non-expiring token stays active on Shopify’s side, and once our row holds the new pair we no longer have its value to run the direct migration. We will migrate every token we still hold, but for stores where the value is gone, and for frozen stores where the migration fails, do those never-used tokens count toward the January 1 determination or the Dev Dashboard alert? Is revoking the client secret the expected way to retire them, or can Shopify retire them on its side?

  3. Alert clearing window in the redesigned Dev Dashboard
    The FAQ says the deprecated offline token warning considers usage in the preceding 14 days. In thread 35623 staff said Dev Dashboard alerts for deprecated API calls now remain for around 30 days after the last call and update in a daily run. Which applies to the non-expiring token alert today: 14 or about 30 days? Is it evaluated in daily batches, and in which timezone? This decides how early our last legacy request must be for the dashboard to be clear on January 1.

Thank you.

Yes it is possible for two competing sub-processes end up in a race condition where one invalidates the other. For your scenario you should consider application-only access token acquisition which will allow the different parts of your system to acquire tokens independently of each other.

  1. Do non-expiring tokens that were replaced by an expiring pair through ID-token
    exchange (unused, and no longer held by the app) count toward the January 1
    compliance determination?

No, only using the non-expiring tokens to make API requests will trigger the alert about non-compliance.

  1. Do the non-expiring tokens of frozen stores count?

Same as above, just holding old non-expiring tokens is not a problem per se.

  1. If either does, is revoking the client secret (after moving the expiring pairs to
    the new secret) the expected way to retire them, or can Shopify retire them on its side?

We’re building a better way to do this revocation and will share it as soon as it’s ready.

Thank you @TerenceShopify

@TerenceShopify, don’t app-only tokens make expiring offline tokens pointless for public apps?

They’re both great, and they both push us in the right direction, but I’ve been trying to get my head around both and find the proper architecture.

They both get you the same permissions and a short-lived 1-hour token.

As I understand it, the offline refresh flow also means a single access/refresh-token family per app and store, so concurrent refreshes can race, and you have to coordinate who rotates. So extra complexity. Application-only tokens overlapping are fine. Both still end in a short-lived access token.

Personally, what I feel makes expiring offline tokens pointless is the short 1h expiry. You still need to pay the same cost every hour, no matter which method you use, at the cost of extra complexity on refreshed offline tokens.

At a large scale, this is massive if you want to keep tokens alive and you don’t want to pay the performance bottleneck of getting a new token every time a merchant doesn’t open the app for more than 1 hour.

If the point of expiry is “admin credentials shouldn’t live forever,” application-only already seems to deliver that. So what is the offline refresh pair still for? What does it solve that application-only doesn’t?

I could see app-only tokens being a fallback for expiring offline tokens, if expiring offline tokens had a longer TTL. That way, keeping a token alive or using app-only tokens would be a trade-off in terms of what makes more sense for you. With the current approach, expiring offline tokens just seem pointless for public apps.

I might be missing something quite obvious.

The refresh-token and the app-only-token are both method of acquiring a new expiring-offline-token.
This is Terence’s own words somewhere in one of the recent offline token related thread

I think they both equally help with man-in-the-middle type of attacks. Both cases you can steal the token but you never have the tools to create a new one.
So an attacker would have only one hour or less to do malicious things with a stolen token.

Also both cases when an attacker gets access into your machine they can emit new tokens. So none of the method seems to have drawback over the other in this circumstance. Except that with the app-only token it’s easy to invalidate by revoking the public key from the admin settings.

The main difference to me is the ease of use and implementation for developers.

I think the only reason both exist is that the app-only-token is the response to the problems of the first release of the refresh-token, but because it’s been released already and people migrated to it already they wont retire it for obvious reasons.

I think you should focus on app-only token and just forget the refresh-token

@TerenceShopify Is there a limit on how many access tokens can be requested at a time per store?

For example, users of our app can configure 50 scheduled tasks to run at the same time. They will run concurrently as separate processes distributed across multiple servers. So to simplify things, we’re thinking that every background task/process to just request its own expiring token (instead of caching by store), which could result in 50 token requests in the same second from a single store.

I don’t see anything in the docs about limits, is it safe to assume there’s no limit here (or some very high limit we likely won’t have to worry about)?

Hi Team,

Do application-only tokens work for the Payments Apps API, and will they going forward?

Two questions about the Payments Apps API (/payments_apps/api//graphql.json) and the application-only token flow (client_credentials with a signed JWT assertion):

  1. Can a token obtained through the application-only flow be used to call the Payments Apps API? The application-only guide only mentions the GraphQL Admin API.
  2. The migration guide says Payments Apps API traffic is exempt from the non-expiring-token cutoff on 2027-04-01. Is that exemption permanent, or will Payments Apps API calls eventually require expiring or application-only tokens too? If so, is there a planned date?

Thanks.