post https://{providerApiEndpoint}/authorization/token
Create token that will be used to identify the same context when we redirect the merchant to your application.
Request body
Name | Type | Mandatory | Description |
---|---|---|---|
applicationId |
string | Yes | VTEX application identifier (always vtex ) |
returnUrl |
string | Yes | The base URL you need to use to form the final URL when redirecting the merchant back to VTEX |
Response body
Name | Type | Mandatory | Description |
---|---|---|---|
applicationId |
string | Yes | The same applicationId sent in the request |
token |
string | Yes | You must generate a token that will be used to identify the same context when we redirect the merchant to your application |
Request examples and their responses
curl --location --request POST 'https://{{providerApiEndpoint}}/authorization/token' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"applicationId": "vtex",
"returnUrl": "https://admin.mystore.example.com/provider-return?authorizationCode="
}'
{
"applicationId": "vtex",
"token": "358a5bea-07d0-4122-888a-54ab70b5f02f"
}