POST

Request an Access Token


Creates your app’s refresh token and an initial access token.

Important: This endpoint is relevant only for custom authentication (legacy). It isn’t relevant for OAuth.

Wix sends your app the authorization code after a new user has completed the installation process and given your app permission to access their data.

You must pass the authorization code, your app ID, your app’s secret key, and {“grant_type”: “authorization_code”} to create the refresh token and an initial access token.

Endpoint
POST
https://www.wixapis.com/oauth/access

Body Params
grant_typestring

Request type. You must pass "authorization_code" to request a custom authentication (legacy) refresh token and an initial access token.


client_idstring

Your app ID, as defined in the Wix Dev Center.


client_secretstring

Your app's secret key ID, as defined in the Dev Center.


codestring

The authorization code that your app has received from Wix

Response Object
Returns an empty object.
Create a custom authentication refresh and access token.
Request
cURL
curl -X POST \ 'https://www.wixapis.com/oauth/access' \ -H 'Content-Type: application/json' \ -d '{ "grant_type": "authorization_code", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "code": "<AUTH_CODE>" }'
Response
JSON
{ "access_token": "<SAMPLE_ACCESS_TOKEN>", "refresh_token": "<SAMPLE_REFRESH_TOKEN>" }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?