Search API library /

Generate a test token to explore our APIs

Authorization

OAuth 2

Access Token Request

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.

POST

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

Request Headers

This API requires an authentication header - pass the access token from the OAuth installation flow.

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 Description

We will respond to your request with an access token and a refresh token, which you’ll use to access our APIs. (These tokens are not relevant for webhooks.)

Access tokens expire after 10 minutes. Use your refresh token to request a new access token.

Status/Error Codes

The response will include an HTTP status code.

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

Examples

curl -X POST \
  https://www.wix.com/oauth/access \
  -H 'Content-Type: application/json' \
  -d '{
    "grant_type": "authorization_code",
    "client_id": <APP_ID>,
    "client_secret": <APP_SECRET>,
    "code": <AUTH_CODE>
}'

Refreshing an Access Token

Request a new access token each time you call our APIs. Use the refresh token together with your secret key, to request a new access and refresh tokens

POST

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

Request Headers

This API requires an authentication header - pass the access token from the OAuth installation flow.

Body Params

NAME

TYPE

DESCRIPTION

grant_type

string

Value must be set to "refresh_token"

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

refresh_token

string

The refresh token issued with the access token.

Response Description

We will respond to your request with a new access and refresh tokens, which you’ll use to access our APIs.

Access tokens expire after 10 minutes

Status/Error Codes

The response will include an HTTP status code.

Response Object

NAME

TYPE

DESCRIPTION

refresh_token

string

The Refresh Token in order to request a new Access Token

access_token

string

The new Access token

Examples

curl -X POST \
  https://www.wix.com/oauth/access \
  -H 'Content-Type: application/json' \
  -d '{
    "grant_type": "refresh_token",
    "client_id": <APP_ID>,
    "client_secret": <APP_SECRET>,
    "code": <REFRESH_TOKEN>
}'