Creates an access token.
Important: This endpoint is relevant for OAuth only. For custom authentication (legacy), use Refresh an Access Token.
The endpoint accepts raw HTTP requests. You must pass the request's body
parameters formatted as bytes in the raw HTTP request's body
field,
following this template:
{"grant_type": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}
.
When the call succeeds, Wix returns {"statusCode": 200}
and the created access
token in the body
field of the raw HTTP response.
In case the call fails, Wix returns the relevant 4XX
error code in the raw
HTTP response's statusCode
field and details
about the error in body
. Error details follow the
conventions of the Internet Engineering Task Force (IETF).
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.