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

Authorization

APIs
  • OAuth 2

    Request an access token and a refresh token before accessing Wix user data. Note: Read about our Authentication process before calling this API.

OAuth 2

Request an access token and a refresh token before accessing Wix user data.

Note: Read about our Authentication process before calling this API.

Endpoints

The endpoints exposed by this API

  • POST

    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 ...

  • POST

    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

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.

Authorization

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

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

Authorization

This API 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 "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 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

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": "refresh_token",
6 "client_id": <APP_ID>,
7 "client_secret": <APP_SECRET>,
8 "refresh_token": <REFRESH_TOKEN>
9}'
)}