Generate authentication token

​

Generates a single-use authentication token for accessing specific resources and actions. Requires a valid API key (x-client-key). For a product:read token on a provisioned single-catalogue account, omit catalogueId; the API resolves and stores the sole enabled catalogue scope. Merchant API requests use x-client-key directly, so merchant-api token requests are rejected.

Body·

required
application/json
  • The feature/resource name or "*"; merchant-api does not issue tokens

  • The CRUD action type or "*"

  • Optional explicit catalogue scope. Omit this for product:read on a provisioned single-catalogue account; the API resolves the sole enabled catalogue associated with the client key. Required for lens:create.

  • User reference to identify the user

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/v1/token
curl https://platform.youzu.ai/api/v1/token \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'x-client-key: YOUR_SECRET_TOKEN' \
  --data '{
  "actionResource": "",
  "actionType": "",
  "userReference": "",
  "catalogueId": ""
}'
{
  "token": "string",
  "expiresIn": 1,
  "actionResource": "string",
  "actionType": "string"
}