Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Request an Access Token

Once a user has completed the installation process and given your app permission to access their data, use the authorization code we sent you, together with your secret key, to request an access token and a refresh token. (The access token is only valid for 10 minutes.) You can find your secret key in the Wix Developers Center.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

POST

https://www.wix.com/oauth/access

Body Params

NAME
TYPE
DESCRIPTION
grant_type

string

Value must be set to "authorization_code"

client_id

string

The App ID as defined in the Wix Developers Center

client_secret

string

The Secret Key for your app as defined in your Wix Developers Center

code

string

The authorization code received from us.

Response Object

NAME
TYPE
DESCRIPTION
refresh_token

string

The Refresh Token in order to request a new Access Token

access_token

string

The requested Access token

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

Copy Code
1curl -X POST \
2 https://www.wix.com/oauth/access \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "grant_type": "authorization_code",
6 "client_id": <APP_ID>,
7 "client_secret": <APP_SECRET>,
8 "code": <AUTH_CODE>
9}'