This article covers the REST-specific access token details for each identity. If you're using the JavaScript SDK, see Set Up a Wix Client instead.
The REST API authenticates every request with an access token sent in the Authorization header: Authorization: <token>. The token type depends on the identity the call should run as.
The sections below cover the token used for each identity and how to obtain it.
For calls that run as an anonymous site visitor, such as browsing public content or managing the visitor's own cart.
anonymous grant type. No login and no client secret are required. Wix returns an access token and a refresh token.For calls that run as a logged-in site member, such as reading their own data or managing their subscription.
REST doesn't support on-behalf-of-Wix-user authentication. To call Wix APIs as a Wix user (such as from a dashboard page), use the SDK with dashboard.auth(). See Set Up a Wix Client.
For calls that run as the installed Wix app, using the app's granted scopes.
client_credentials grant type and the OAuth app's client ID and secret. No instance ID is needed: a headless OAuth client belongs to exactly one site, so Wix resolves its installation for you. This is the recommended flow for admin operations scoped to a headless project's own site.client_credentials grant type, sending your app ID, app secret, and app instance ID. Wix includes the instance ID in every event and service plugin request, for example the App Instance Installed event, and in the app instance query parameter for external pages and iframe extensions.Note: Client is the OAuth protocol's term for the app that holds credentials, so the token endpoint's fields are named client_id and client_secret for every caller. Because a headless OAuth client is itself an app, your app ID and client ID are the same identifier, and you may see either name across Wix. Whatever your context calls it, pass it in the client_id field, with your secret in client_secret.
For administrative server-to-server operations that don't depend on a user session, such as managing sites or importing data.
Authorization header of REST requests.Unlike the token-based identities above, an API key isn't bound to a single site, so each request must also identify its target: send a wix-site-id header for site-level calls or a wix-account-id header for account-level calls, but not both. For how to retrieve these IDs, see Generate an API Key.
API keys are used in partner workflows and as an alternative to the OAuth client_credentials flow for admin operations in self-managed headless projects. They aren't available to third-party Wix apps.
Access tokens are short-lived and must be refreshed before they expire. API keys are long-lived and remain valid until revoked or rotated in the Wix dashboard.
For REST callers: if a call returns 401, the token has likely expired. For visitor and member tokens, call the token endpoint with your refresh token and the refresh_token grant type to get a new access token. For app tokens, call Create Access Token again with the client_credentials grant type and your credentials.
Apps and headless projects hold credentials (app ID, app secret, API keys) to authenticate. Treat them like passwords:
Notes:
In Wix-managed apps and Wix-managed headless projects, Wix manages these credentials for you.
Last updated: 22 July 2026