Domain name for API request: mqtt.intl.tencentcloudapi.com.
This API is used to query the MQTT message details.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: DescribeMessageDetails. |
| Version | Yes | String | Common Params. The value used for this API: 2024-05-16. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | tencent cloud MQTT instance ID, obtained from the DescribeInstanceList api or console. |
| MessageId | Yes | String | Message ID. |
| Subscription | No | String | Subscription expression. |
| Parameter Name | Type | Description |
|---|---|---|
| Body | String | Message body. |
| UserProperties | Array of UserProperty | Describes the user-customized attribute. |
| StoreTimestamp | Integer | Specifies the message storage time. millisecond-level timestamp. |
| MessageId | String | Message ID. |
| ClientId | String | Producer address. |
| Qos | String | Topic |
| OriginTopic | String | Specifies the source topic. |
| ContentType | String | Content type (MQTT5). Indicates the content type of the message payload using standard MIME type format. helps the receiver correctly parse and process the message content. Specifies the example. application/json: indicates the payload is data in json format. Text/Plain: indicates the payload is plain text. application/octet-stream: indicates the payload is binary data. |
| PayloadFormatIndicator | Integer | Payload format indicator (MQTT5). Indicates the payload format, which is a boolean value. 0 means an unspecified format (binary), and 1 means a UTF-8 encoded string. Specifies the example. Valid values: 0 indicates the payload is binary data, such as images or audio. Valid value 1: when the payload is UTF-8 encoded text, such as JSON string or XML. |
| MessageExpiryInterval | Integer | Message expiration interval (MQTT5). Specifies the validity time (in seconds) of the specified message before it is discarded. if the message fails to reach the MQTT server before expiration, it will be discarded. Specifies the example. The value 60 indicates that the message is valid within 60 seconds after release. unreached messages will be dropped after expiry. A value of 0 indicates the message never expires and remains permanently valid until received or the session ends. |
| ResponseTopic | String | Response topic (MQTT5). Specifies a topic for the response message in request-response mode. the sender can specify which topic the recipient should send the response to. Specifies the example. Sender publishes a request to the topic devices/device1/commands and sets ResponseTopic to devices/device1/responses. Specifies the topic where the response is published after the recipient processes the request. |
| CorrelationData | String | Associated data (MQTT5). Specifies the identifier used to associate a request and response, usually a byte array. in request-response mode, the sender sets this value, and the recipient includes the same value in the response so that the sender can identify the corresponding request. Specifies the example. The sender generates a unique ID (such as a byte[] of UUID) as CorrelationData and adds it to the request message. The recipient includes the same CorrelationData in the response message. the sender compares this value to match the response and the request. |
| SubscriptionIdentifier | String | Subscription identifier (MQTT5). Specifies the unique identifier assigned to the subscription, used to identify a specific subscription of the client. when sending a message to the client, the server can include this identifier to help with client identification of the corresponding subscription. Specifies the example. The client subscribes to the topic devices/+/temperature and sets SubscriptionIdentifier to 123. When the server sends a message of this topic to the client, the message will contain SubscriptionIdentifier: 123. the client can know which subscription the message is sent through based on this value. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you the example.
POST / HTTP/1.1
Host: mqtt.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeMessageDetails
<Common request parameters>
{
"InstanceId": "mqtt-g839agr2",
"MessageId": "15397032005D639FEE4893603732005C"
}{
"Error": null,
"RequestId": null,
"Response": {
"Body": "this is body",
"ClientId": "client1",
"MessageId": "15397032005D639FEE4893603732005C",
"OriginTopic": "home/room3",
"Qos": "1",
"RequestId": "ba5d5d6a-64c9-40cf-8889-21efed76389d",
"StoreTimestamp": "1745828681259",
"UserProperties": [
{
"Key": "key1",
"Value": "value-1"
},
{
"Key": "key2",
"Value": "value-2"
}
]
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| ResourceNotFound.Instance | ResourceNotFound.Instance |
| ResourceNotFound.Message | ResourceNotFound.Message |
Feedback