Skip to Content
Short Message Service(USMS)GetUSMSSendReceipt

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 NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetUSMSSendReceipt.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesNo
ZonestringAvailability Zone. See Availability Zone ListNo
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
SessionNoSet.NstringThe 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 NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
Dataarray[ReceiptPerSession]Receipt Information CollectionYes

Data Model

ReceiptPerSession

Field NameTypeDescription InformationRequired
SessionNostringSessionNo returned when sending a messageYes
ReceiptSetarray[ReceiptPerPhone]Collection of SMS receipt information for each mobile numberYes

ReceiptPerPhone

Field NameTypeDescription InformationRequired
PhonestringMobile NumberYes
CostCountintConsumed SMS CountYes
ReceiptResultstringReceipt 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
ReceiptCodestringStatus Report CodeYes
ReceiptDescstringReceipt Result DescriptionYes
ReceiptTimeintReceipt Return TimeYes
UserIdstringCustom business identification ID, stringYes

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 }