All Products
Search
Document Center

ApsaraMQ for MQTT:Token authentication service migration

Last Updated:Mar 11, 2026

As of January 1, 2021, the legacy token authentication service for ApsaraMQ for MQTT is no longer available. The token API has moved to the new cloud service gateway. If your application still calls the old endpoint, migrate to the ApplyToken API.

Check whether migration applies to you

How you obtain tokens determines whether migration is required:

Current methodAction required
Call https://{tokenServerUrl}/token/applyMigrate to the ApplyToken API. See migration details below.
Call the ApplyToken APINo action needed. You are already on the new service.

Migration scope

This migration affects only the cloud API used to obtain tokens. The tokens that ApsaraMQ for MQTT clients use to authenticate MQTT connections remain unchanged -- no client-side modifications are needed.

Before the legacy service was retired, the new ApplyToken API was fully compatible with the old API. Traffic could be switched gradually between the two versions.

New cloud service gateway benefits

Migration to the new cloud service gateway brings the following benefits:

CapabilityDetails
Access methodsHTTP and SDKs for multiple programming languages, with ready-to-use demos. Signature strings are automatically calculated, which helps reduce access costs.
Performance and stabilityGlobal acceleration with built-in throttling and isolation, reducing API response time and improving service stability.
DebuggingBuilt-in debugging channels for real-time parameter inspection and result verification.
Identity supportResource Access Management (RAM) users and Security Token Service (STS)-authorized accounts.

For details on token-based authentication access methods, see Token-based authentication overview.

Next steps

  • Review the ApplyToken API reference to understand request parameters and response format.

  • Update your token-fetching code to call the new ApplyToken API through the cloud service gateway SDK for your programming language.

  • For questions about the migration, contact us.