All Products
Search
Document Center

Short Message Service:QueryMessage

Last Updated:Apr 19, 2024

Queries the delivery report of a message.

Operation description

QPS limit

You can call this operation up to 300 times per second. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dysms:QueryMessageRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MessageIdstringYes

The ID of the message.

1008030xxx3003

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Statusstring

The delivery status of the message.

  • 1: The message was sent.
  • 2: The message failed to be sent.
  • 3: The message is being sent.
1
ErrorDescriptionstring

The description of the status code.

success
ResponseCodestring

The status code of the delivery request.

OK
ReceiveDatestring

The time when the delivery receipt was received from the carrier.

Mon, 24 Dec 2018 16:58:22 +0800
NumberDetailobject

The details about the mobile phone number.

Carrierstring

The carrier that owns the mobile phone number.

CMI
Regionstring

The region to which the mobile phone number belongs.

HongKong
Countrystring

The country to which the mobile phone number belongs.

China
Messagestring

The content of the message.

Hello!
ResponseDescriptionstring

The description of the delivery request status.

The SMS Send Request was accepted
ErrorCodestring

The status code of the message.

DELIVERED
SendDatestring

The time when the message was sent to the carrier.

Mon, 24 Dec 2018 16:58:22 +0800
Tostring

The mobile phone number to which the message was sent.

6581xxx810
MessageIdstring

The ID of the message.

1008030xxx3003
RequestIdstring

The ID of the request.

F655A8D5-B967-440B-8683-DAD6FF8D28D0

Examples

Sample success responses

JSONformat

{
  "Status": "1",
  "ErrorDescription": "success",
  "ResponseCode": "OK",
  "ReceiveDate": "Mon, 24 Dec 2018 16:58:22 +0800",
  "NumberDetail": {
    "Carrier": "CMI",
    "Region": "HongKong",
    "Country": "China"
  },
  "Message": "Hello!",
  "ResponseDescription": "The SMS Send Request was accepted",
  "ErrorCode": "DELIVERED",
  "SendDate": "Mon, 24 Dec 2018 16:58:22 +0800",
  "To": "6581xxx810",
  "MessageId": "1008030xxx3003",
  "RequestId": "F655A8D5-B967-440B-8683-DAD6FF8D28D0"
}

Error codes

For a list of error codes, visit the Service error codes.