Get USMS send status - GetUSMSSendReceipt
Overview
Invoke the GetUSMSSendReceipt interface for SMS sending status information
💡 After submitting the SMS for sending, you can call the GetUSMSSendReceipt interface to query and get the status information of the SMS sending; if you do not get the receipt status immediately after sending, it is recommended to try to get it within 5 to 10 minutes after sending. If you still haven’t gotten the sending status after 12 hours, you can contact UCloud technical support for assistance.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetUSMSSendReceipt . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | No |
Zone | string | Availability Zone. See Availability Zone List | No |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
SessionNoSet.N | string | The collection of SessionNo returned when sending a message, in the format of SessionNoSet.0, SessionNoSet.1… The number of collections for a single call needs to be controlled within 100. | Yes |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Data | array[ReceiptPerSession] | Receipt Information Collection | Yes |
Data Model
ReceiptPerSession
Field Name | Type | Description Information | Required |
---|---|---|---|
SessionNo | string | SessionNo returned when sending a message | Yes |
ReceiptSet | array[ReceiptPerPhone] | Collection of SMS receipt information for each mobile number | Yes |
ReceiptPerPhone
Field Name | Type | Description Information | Required |
---|---|---|---|
Phone | string | Mobile Number | Yes |
CostCount | int | Consumed SMS Count | Yes |
ReceiptResult | string | Receipt results, enumeration values: > Send successful: Represents success > Success: Represents success > Send failed: Represents failure > Fail: Represents failure > Status unknown: Represents unknown > Unknow: Represents unknown | Yes |
ReceiptCode | string | Status Report Code | Yes |
ReceiptDesc | string | Receipt Result Description | Yes |
ReceiptTime | int | Receipt Return Time | Yes |
UserId | string | Custom business identification ID, string | Yes |
Example
Request Example
https://api.ucloud-global.com/?Action=GetUSMSSendReceipt
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=GqkCNOVN
&SessionNoSet.N=nAQDODtO
Response Example
{
"Action": "GetUSMSSendReceiptResponse",
"Data": [
{
"ReceiptSet": [
{
"CostCount": 6,
"Phone": "QbPtKJPa",
"ReceiptCode": "0",
"ReceiptDesc": "DxMRsuET",
"ReceiptResult": "发送成功",
"ReceiptTime": 6,
"UserId": "1213"
}
],
"SessionNo": "BmThtoRB"
}
],
"Message": "OnVhSPcD",
"RetCode": 0
}