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 calls use actionResource: merchant-api, an explicit catalogueId, and the action documented on the target Merchant API operation.

Body·
required
application/json
  • actionResource
    Type: string
    min length:  
    1
    required

    The feature/resource name or "*"

  • actionType
    Type: string
    min length:  
    1
    required

    The CRUD action type or "*"

  • catalogueId
    Type: string

    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 and all merchant-api actions (suggest-identity, suggest-category, suggest-attributes, suggest-images, suggest-descriptions, and asset-upload).

  • userReference
    Type: string

    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"
}