All Products
Search
Document Center

ApsaraMQ for MQTT:Token management API operations for application servers

Last Updated:Mar 11, 2026

ApsaraMQ for MQTT provides API operations that your application server uses to manage the lifecycle of authentication tokens. In the token-based authentication workflow, the application server calls these operations on the authorization server to apply for, validate, and revoke tokens on behalf of MQTT clients.

Token lifecycle

The following operations correspond to three stages in the token lifecycle:

  1. Apply for a token -- Call ApplyToken to apply for a token from the authorization server.

  2. Validate a token -- To check whether an issued token is still valid, call QueryToken.

  3. Revoke a token -- To invalidate a token, call RevokeToken.

API operations

OperationDescription
ApplyTokenApply for a token.
QueryTokenVerify the validity of a token.
RevokeTokenRevoke a token.

Set parameters and handle return values based on the API specifications linked in the table. Incorrect parameter values may cause the API call to fail.