All Products
Search
Document Center

ApsaraMQ for MQTT:ListDeviceCredentialClientId

Last Updated:Jan 04, 2026

Queries clients that have applied for access credentials in unique-certificate-per-device authentication mode in an ApsaraMQ for MQTT instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mq:MqttInstanceAccess

list

*Instance

acs:mq:{#regionId}:{#accountId}:{#InstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the Cloud Message Queue MQTT version instance, which must match the actual instance ID used by the client. You can obtain this ID from the Instance Details page in the console.

mqtt-xxxxxxxx

GroupId

string

Yes

Group ID of the MQTT version of the micro message queue.

GID_xxx

PageNo

string

No

Indicates the page number of the returned results. The starting page is counted from 1.

1

PageSize

string

Yes

The maximum number of query records to display per page. Value range: 1 to 100.

100

NextToken

string

No

Token for starting the next page query.

FFdXXXXXWa

Response elements

Element

Type

Description

Example

object

RequestId

string

Public parameters, each request ID is unique and can be used for troubleshooting and problem localization.

020F6A43-19E6-4B6E-B846-44EB31DF****

DeviceCredentialClientIdList

object

Returns the information list.

Total

string

Total number of query results.

10

ClientIdList

array

Client list.

string

Client ID.

GID_test@@@pub-1

PageNo

string

The current page number of the returned query records.

1

PageSize

string

The maximum number of results to display per page.

100

NextToken

string

Indicates whether there is a token (Token) for the next query. Values:

  • For the first query and when there is no next query, this field does not need to be filled.

  • If there is a next query, the value should be the NextToken returned from the previous API call.

634dxxxxx75b5f

Examples

Success response

JSON format

{
  "RequestId": "020F6A43-19E6-4B6E-B846-44EB31DF****",
  "DeviceCredentialClientIdList": {
    "Total": "10",
    "ClientIdList": [
      "GID_test@@@pub-1"
    ],
    "PageNo": "1",
    "PageSize": "100",
    "NextToken": "634dxxxxx75b5f"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 ApplyTokenOverFlow You have applied for tokens too many times. Please try again later.
400 CheckAccountInfoFailed An error occurred while checking the account information by the STS token.
400 InstancePermissionCheckFailed An error occurred while validating the permissions of the instance. Please verify the account that created the instance and its permissions settings.
400 ParameterCheckFailed An error occurred while validating the parameters. The parameters may be missing or invalid.
400 PermissionCheckFailed An error occurred while validating the resource permissions. Please check the account that created the instance, topic, and GroupId, and check their permission settings.
400 InvalidParameter.%s An error occurred while validating the parameter. The parameter may be missing or invalid.
400 DeviceCredentialNotFound Device Credential Not Found.Check if the device certificate is registered.
400 DeviceCredentialNumExceed The number of device credentia exceeds the limit. Please revoke unused device certificates.
500 InternalError An error occurred while processing your request. Try again later.
500 SystemOverFlow An error occurred while processing your request. Please try again.
404 ApiNotSupport The specified API is not supported.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.