# Shopify Expiring Offline Token Migration

> Move your Shopify app to expiring offline access tokens without locking out installed stores. Audits your code, adds safe refresh logic, migrates existing installs and verifies the result.

Shopify Expiring Offline Token Migration is a paid AI agent skill on Agensi by Nahid hossain, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [Nahid hossain](https://www.agensi.io/creators/nahid-hossain)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.2
- Last updated: 2026-12-03
- Security: scan passed (2026-12-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/shopify-expiring-offline-token-migration
- Tags: api, ecommerce, security, migration, authentication, access-token, refresh-token

## About this skill

### The problem
Shopify is requiring expiring offline access tokens. For existing public apps still on non-expiring tokens, delisting starts January 1, 2027 and the Admin API rejects those tokens from April 1, 2027.

This skill guides your coding agent through the migration in a safe order: audit first, change code second, exchange live tokens last.

### What it does
- Finds every place your app requests, stores, copies and reads access tokens
- Helps you choose between gradual migration, migrating all stores at once, or application-only tokens
- Updates storage for refresh tokens and expiry times
- Adds refresh logic that handles concurrent workers, retries and final failures
- Writes a migration script that starts as a dry run, runs in stages and can be re-run
- Verifies on a development store and checks for tokens still in use

### Why not just prompt your agent?
A short prompt can miss what makes this migration risky. Exchanging a token is permanent, two refreshes at once can break a store's access, and quiet stores still need refreshing. This skill puts those checks and approval stops into the steps.

### Works with
Your app's own code and token storage, Shopify app templates or hand-written token requests, and a development store for testing.

### Test prompts

- Our public Shopify app still stores offline tokens that never expire. Audit the code and tell me what has to change before the deadline.
- Write a script that exchanges all our stored offline tokens for expiring ones.
- After switching to expiring tokens our background jobs randomly get 401 on refresh. We run four workers.
- We use @shopify/shopify-app-remix. How do we turn on expiring tokens?

### Safety
The agent asks before deploying, changing your schema or making a live token request. It never prints token or secret values.

### Where it stops
It does not cover the Payments Apps API, and it cannot recover a store whose refresh token is no longer valid. Such a store needs to re-authenticate.

## Known limitations

Does not support the Payments Apps API. Exchanging a non-expiring token is irreversible: the old token stops working as soon as the exchange succeeds. Database schema changes and live token exchanges need your approval each time. A Dev Dashboard alert can take up to 14 days to clear after the last request that used a non-expiring token. Test on a development store first. Not affiliated with or endorsed by Shopify.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Shopify Expiring Offline Token Migration skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific problem does this skill solve for Shopify app developers?

This skill identifies non-expiring offline access tokens in your code and migrates them to expiring pairs. It prevents 403 errors and app delisting by adding safe refresh logic and batch-exchanging existing merchant tokens before the 2027 Shopify deadline.

### What do I need to provide for the skill to work on my project?

You need to provide the app codebase for auditing and your Shopify client credentials. For the migration phase, the skill requires access to your token storage, such as database tables or secret stores, and a development store for safe testing.

### What are the final deliverables I can expect?

The skill produces a full codebase audit, updated authentication and storage logic, a resumable migration script for existing installs, and a verification suite of tests. It provides reports on migrated stores, failed exchanges, and remaining legacy tokens.

### Are there any Shopify app types or tasks that this skill cannot handle?

This skill does not support the Shopify Payments Apps API. It also requires manual approval for all database schema changes and live production token exchanges to ensure no merchants are accidentally locked out.

### How does the skill ensure that existing merchants are not locked out during the move?

The skill includes a batch migration script that uses dry-run protection to count eligible stores first. It exchanges tokens one by one, verifying each save before moving to the next, and uses shared locking to prevent race conditions during concurrent refreshes.

### How should I ask my agent to start this migration process?

You can ask your agent to audit your Shopify app for non-expiring tokens or help you migrate to expiring offline access tokens to meet the 2027 deadline. It is also helpful to mention if you are seeing 403 errors regarding non-expiring tokens.

### My app uses a Shopify app template. Do I need this?

The template change is usually a single setting. The skill still helps you check your session storage and find code that reads tokens directly.

### Do custom apps need to migrate?

Custom apps created on or after December 1, 2026, must use expiring tokens. Older ones may keep their existing tokens.

### Why does it list environment variables?

Your app may keep its client ID and secret there. The skill does not collect, print or store them. They are used only by your app's own code and by the token requests you approve.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
