POST

Refresh an Access Token


Creates a new access token.

Important: This endpoint is relevant only for custom authentication (legacy). For OAuth, use Create Access Token.

You must pass your app ID, your app’s secret key, the refresh token, and {“grant_type”: “refresh_token”} to create a new access token.

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

Body Params
grant_typestring

Request type. You must pass "refresh_token" to request a new access token when using custom authentication (legacy).


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.


refresh_tokenstring

Your app instance’s refresh token.

Response Object
refresh_tokenstring

Your app instance’s refresh token that never expires. Identical to the one that you’ve sent in the request.


access_tokenstring

Created access token that you can use to make Wix API calls. It expires after 5 minutes.

Create a custom authentication access token.
Request
cURL
curl -X POST \ 'https://www.wixapis.com/oauth/access' \ -H 'Content-Type: application/json' \ -d '{ "grant_type": "refresh_token", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "refresh_token": "<REFRESH_TOKEN>" }'
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?