The most dangerous credential in an agent stack is the one that never expires.
Shopify is retiring exactly that kind of credential.
Public apps must switch to Shopify expiring offline access tokens by January 1, 2027, and affected Admin API requests that still use non-expiring Shopify offline access tokens return HTTP 403 from April 1, 2027. For agent apps, that changes how background workers and integrations keep access to merchant data without anyone opening the app.
An agent with a perfectly good reasoning loop is still useless once its AI agent credentials stop working, so I treat this migration as an infrastructure change, not a parameter change.
What is changing with Shopify offline access tokens in 2027?
Shopify is extending its requirement for expiring offline access tokens to all public apps accessing the Admin API.
The requirement previously applied to newly created public apps from April 1, 2026. The original breaking API change announcement establishes January 1, 2027, as the deadline for existing public apps.
Shopify subsequently published an updated enforcement schedule:
- January 1, 2027: Non-compliant public apps are delisted from the Shopify App Store and blocked from receiving new installations.
- January 15, 2027: Merchants using affected apps begin seeing warnings in their Shopify admin.
- April 1, 2027: Affected Admin API requests using non-expiring offline access tokens return HTTP 403.
Existing installations can keep making affected requests until April 1, but Shopify says plainly that the later dates give merchants time to prepare and “should not be treated as extra time to migrate”.
Custom apps, apps created by merchants through the Dev Dashboard or Shopify admin, and online access tokens are outside this specific requirement.
For a public app with AI-powered order management, catalogue optimisation, customer support or scheduled reporting, the first question is whether its backend still depends on stored non-expiring offline credentials.
Why is Shopify moving away from permanent credentials?
Shopify’s reasoning is straightforward:
Non-expiring tokens, if leaked, remain valid indefinitely. Expiring tokens close that window in 60 minutes and rotate automatically.
That matters most in agent infrastructure. A conventional app reaches merchant data through a fairly predictable set of backend operations; an agent app may involve orchestration services, queues, scheduled tasks, external tools and several execution environments, and every component that handles a credential is another place it needs protecting.
A common pattern: a background agent prepares catalogue improvements and passes approved changes to another service, and both services get the same permanent credential because sharing it is convenient.
The problem is not necessarily what the agent does, but how far the credential travels and how long it stays useful. I separate an agent’s ability to request an operation from the infrastructure’s ability to authenticate it: the agent works with narrowly defined tools, and a controlled backend manages the credentials those tools need.
This follows the same architectural principle I discuss in my notes on controlling agent access and permissions: access should be deliberately bounded rather than inherited from whatever credentials happen to be available.
Token expiration improves credential lifecycle management, but it does not replace appropriate permissions, secure storage or controlled execution.

Which Shopify token migration path would I choose for an agent app?
Shopify’s official migration guide describes three paths, each for a different authentication pattern.
Option 1: Request expiring tokens from now on.
Update the authentication flow to request expiring offline access tokens using expiring=1, and securely store the returned Shopify refresh token alongside the access token.
Existing installations move over as merchants open the app. I would make this change first; otherwise the app keeps creating non-expiring credentials while the migration tries to replace the old ones.
Option 2: Exchange existing non-expiring tokens.
Shopify token exchange allows the backend to migrate stored non-expiring credentials without an active merchant session.
This is particularly relevant for webhook consumers, scheduled workers and agent applications that perform most of their work outside the merchant-facing interface.
The exchange permanently invalidates the original token. If a response is lost, Shopify lets you retry within seven days to recover it, and that recovery path belongs in the migration design, not in an improvised fix.
Option 3: Use client credentials access.
Shopify client credentials access lets a backend obtain short-lived application-only tokens through a client assertion signed with the app’s private key.
These tokens remain valid for up to one hour and do not require a refresh token. Obtaining them through this path does not invalidate previously issued non-expiring tokens.
My decision framework would look like this:
| Agent application pattern | Migration path | Main engineering consideration |
|---|---|---|
| Merchant-facing app with AI features | Option 1 | Update authentication and persist refresh credentials |
| Existing background agent | Options 1 and 2 | Migrate stored credentials without waiting for merchant activity |
| Webhook-driven integration | Options 1 and 2 | Coordinate token replacement with background processing |
| Backend suited to application-only authentication | Option 3 | Protect the signing key and manage short-lived token acquisition |
| Mixed interactive and background architecture | Evaluate all applicable paths | Centralise credential ownership and authentication policy |
I would not pick a path just because it means fewer code changes; the authentication model should match how the app actually runs. Where options 1 and 2 are used together, Shopify recommends implementing option 1 before beginning option 2.
Building a Shopify-connected agent or reviewing an existing authentication architecture? Contact me to discuss the credential lifecycle and migration approach.
Where could an AI agent application break during the migration?
The obvious failure is an expired credential. The more interesting ones come from assumptions spread across the application.
Background workers without merchant sessions.
A common pattern: an order-processing agent runs entirely through scheduled jobs and webhooks. Its merchant-facing dashboard is rarely opened.
Relying only on merchant activity to migrate credentials leaves the background path unresolved; stored-token exchange is the relevant tool here.
Credentials copied across services.
A common pattern: an application stores its offline token in a database, while separate workers retain copies in their own configuration or cache.
Once token exchange invalidates the original credential, those copies become stale. Updating the main application does not necessarily update every consumer.
Concurrent refresh operations.
A common pattern: several workers notice that a shared access token is approaching expiry and independently attempt to refresh it.
Without coordination, workers can overwrite credential state or keep using stale values. I would design refresh as a controlled operation with a single logical writer.
Credentials entering logs or agent prompts.
A common pattern: debugging middleware records complete tool arguments, authentication headers or responses from an integration.
Short-lived credentials are still sensitive, as are refresh tokens and signing keys. I would keep authentication material outside the model’s context and redact it from operational logs.
It is the same underlying lesson from modernising authentication for email-sending agents: credential management belongs in the execution infrastructure, not in the reasoning layer.

How would I run the Shopify token migration?
I would organise the migration around credential ownership, lifecycle management and controlled deployment. First, I would inventory every component that reads, stores or uses Shopify credentials. That includes the application backend, webhook handlers, queue workers, scheduled jobs, reporting integrations and agent execution services.
For each, I record the credential’s owner, its consumers and the authentication path each one uses.
Next, I would establish a central credential store for each installation using the relevant fields Shopify documents:
access_tokenrefresh_tokenexpires_inrefresh_token_expires_in
The store derives expiry from the returned lifetimes, and workers obtain valid access through a shared authentication component rather than independently managing persistent copies.
For refresh-based authentication, I would refresh before expiry and use a single-writer mechanism to coordinate concurrent requests. For client credentials access, I would centralise token acquisition and protect the private signing key.
Then I would add visibility. An HTTP 401, or a Shopify Admin API 403, should trigger an alert and investigation, not an unlimited retry loop, and neither status is automatically proof of token expiry.
This is part of the broader operational discipline behind production agent systems: external dependencies need observable failure states and controlled recovery paths.
My migration checklist would be:
- Identify affected public app authentication flows.
- Inventory stored offline tokens and their consumers.
- Implement expiring token issuance before stored-token exchange.
- Establish secure, centralised credential storage.
- Track access and refresh credential expiry.
- Implement proactive refresh and single-writer coordination.
- Evaluate client credentials access where appropriate.
- Remove unnecessary credential copies from workers and caches.
- Redact credentials from logs, traces and model context.
- Prepare recovery handling for interrupted token exchanges.
- Test background jobs without active merchant sessions.
- Configure alerts for HTTP 401 and 403 responses.
- Roll out the migration in controlled store cohorts.
- Verify authentication across every affected execution path.
Rollback cannot mean restoring the original non-expiring token after exchange, because Shopify permanently invalidates it. Recovery should focus on obtaining valid credentials through the supported authentication mechanisms and restoring consistent credential state.
What other Shopify security changes should agent builders consider?
The October 2026 app security update introduces several related capabilities and requirements.
Beyond expiring offline credentials, Shopify describes:
- Client credentials access: Short-lived application-only authentication using signed assertions.
- Admin API IP allowlisting: Restricting API access to approved IP addresses and rejecting requests originating elsewhere.
- Network access declarations: A
network_accesssection inshopify.app.tomlfor declaring network access. - Identity verification: Verification before installations on development and client-transfer stores.
- App security hub: A dedicated location for reviewing app security.
- Security checks: Running
shopify app security checkbefore every release.
IP allowlisting, for example, needs care when workers run across different environments, so I would map outbound network paths before adding restrictions.
Credential lifecycle, network boundaries and release checks belong in one review.
What would I verify before calling the migration complete?
I would verify the deployed application’s actual behaviour, not just its framework configuration. Shopify says its app templates and official API libraries already implement token refresh, but individual apps may contain custom authentication handlers, older integrations or background services that bypass them. Dates and guides can also change, so I would re-read Shopify’s current guidance before deployment.
For me, done means the app keeps valid credentials through its intended path without ever exposing them to the agent.
Key takeaways
- January 1, 2027, is the migration deadline for affected public Shopify apps.
- Merchant warnings begin January 15, and affected requests return HTTP 403 from April 1.
- Update new token issuance before exchanging existing stored credentials.
- Treat refresh coordination, credential storage and recovery as infrastructure responsibilities.
- Keep authentication secrets outside agent prompts and reasoning workflows.
- Verify the deployed application against Shopify’s current documentation.
If you are designing or modernising an agent application, explore my cloud and agent infrastructure services to discuss the architecture behind reliable execution.
For more field notes on agent infrastructure, authentication, software dependencies and production engineering, sign up for my Production Notes newsletter.
— Rezaul Hoque Turjo, Founder, NextCTL
FAQ
When must Shopify apps use expiring offline access tokens?
All affected public Shopify apps accessing the Admin API must use expiring offline access tokens by January 1, 2027. Non-compliant apps are delisted from the Shopify App Store and blocked from new installations from that date. Shopify explicitly states that the subsequent merchant-warning and API enforcement dates should not be treated as additional migration time.
What happens on April 1, 2027?
From April 1, 2027, affected Shopify Admin API requests authenticated with non-expiring offline access tokens return HTTP 403. For agent applications, this can interrupt background processing, catalogue updates, order-related operations and other features that depend on those requests. Developers should complete the applicable authentication migration before the January deadline rather than waiting for API enforcement.
Do custom Shopify apps need to migrate?
Custom apps and apps created by merchants through the Shopify Dev Dashboard or Shopify admin are not affected by this specific public app requirement. Online access tokens are also unaffected. Developers should confirm their application’s classification and authentication model before deciding whether migration is necessary. The exclusion does not remove the need for appropriate credential security.
Do merchants have to reinstall my app?
No. Shopify states that merchants do not need to reinstall their apps for this migration. Developers can update the authentication flow to issue expiring credentials or exchange existing stored non-expiring tokens without an active merchant session. Client credentials access provides another authentication path where appropriate. The developer remains responsible for implementing and validating the chosen approach.