Skip to main content

Authentication

AccessKey authentication, signing methods, and RAM permissions for Token Plan API.

Token Plan API uses Alibaba Cloud AccessKey authentication and does not support Authorization: Bearer {API_KEY}. Seat purchase and modification operations use a different signing method from other Token Plan operations. Configure authentication based on the operation type before calling the API.

Get an AccessKey

  1. Log on to the Alibaba Cloud console, go to the AccessKey management page, and create or view an AccessKey.
  2. Configure the AccessKey as the ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET environment variables to avoid hard-coding credentials.
  3. Grant the required permissions to the RAM user.
An AccessKey represents its Alibaba Cloud account or RAM user. If leaked, the permissions of that identity may be abused. Keep it secure and do not share it or commit it to a code repository.

ModelStudio authentication

Other Token Plan operations belong to ModelStudio (version 2026-02-10) and use ACS3-HMAC-SHA256 signing. Requests must include the following common headers:
  • x-acs-action: The operation name, such as GetOrganization.
  • x-acs-version: Set to 2026-02-10.
  • x-acs-date: The UTC time.
  • x-acs-content-sha256: The SHA256 digest of the request body.
  • x-acs-signature-nonce: A random number.
  • Authorization: The signature in the format ACS3-HMAC-SHA256 Credential=...,SignedHeaders=...,Signature=....
Use an Alibaba Cloud SDK or OpenAPI Explorer to call the operation. The SDK generates the common headers and calculates the signature.
  • https://modelstudio.cn-beijing.aliyuncs.com/tokenplan/*

BssOpenApi authentication

Seat purchase and modification operations belong to BssOpenApi (version 2023-09-30) and use RPC signing (HMAC-SHA1). All parameters are passed in the form or query string. Use the CommonRequest of an Alibaba Cloud SDK, which generates the common parameters and calculates the signature.
  • https://business.aliyuncs.com/

RAM permissions

  • Seat purchase and modification: Grant the RAM user the required BssOpenApi seat permissions, such as bssapi:CreateCreditSeat, bssapi:AddCreditSeats, bssapi:UpgradeCreditSeat, bssapi:ReduceCreditSeats, and bssapi:RenewCreditSeat.
  • Other Token Plan operations: Grant the RAM user ModelStudio Token Plan permissions as described in the operation documentation. The Alibaba Cloud primary account can call the operations directly.
After configuration, choose an operation from the overview or see Error codes.