Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.
Session Token API
The API for interacting with session tokens.
Anchor to StandardApiStandard Api
The base API object provided to purchase extension targets.
- Anchor to sessionTokensessionTokensessionTokenSessionTokenSessionTokenrequiredrequired
The session token providing a set of claims as a signed JSON Web Token (JWT).
The token has a TTL of 5 minutes.
If the previous token expires, this value will reflect a new session token with a new signature and expiry.
Learn more about session tokens.
SessionToken
- get
Requests a session token that hasn't expired. You should call this method every time you need to make a request to your backend in order to get a valid token. This method will return cached tokens when possible, so you don’t need to worry about storing these tokens yourself.
() => Promise<string>
Anchor to useSessionTokenuse Session Token()
Provides access to session tokens, which can be used to verify token claims on your app's server.