Authorization header. Swish supports two token types depending on where the request originates.
API keys
Use an API key for server-side requests where the token can be kept secret. To request an API key, contact support@swish.app.Client tokens
Use client tokens for browser-side requests. A client token is a short-lived JWT scoped to a single customer or anonymous session. Your server obtains one by callingPOST /profiles/token with your API key, then passes it to the client.
Token creation flow
1
Server requests a token
Your server calls The response includes the token and the associated profile:
POST /profiles/token with the customer’s Shopify GID. For anonymous visitors, omit the customer field to create a session token.2
Client uses the token
Pass the token to the client and use it for subsequent API requests.
Auth proxy
On Shopify themes, the Swish app proxy handles token creation automatically. Headless storefronts (Hydrogen, Next.js, or custom frontends) need to run their own auth proxy using the@swishapp/auth-proxy package.
The auth proxy stores your API key server-side and creates scoped client tokens on behalf of your customers. Your storefront calls the proxy to obtain a token, then uses that token directly against the Swish API for all subsequent requests.
See the auth proxy guide for full setup
instructions with Hydrogen, Next.js, and custom frameworks.