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

AccessTokenRequest

object

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

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}'

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

RefreshRequest

object

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

Request

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