筛选菜单

Montnets International SMS Platform API Manual (V5.13)




1. API Introduction


Montnets cloud communication platform API is Montnets with many years of development experience, Simple and easy-to-use API calling service for users, all are providing one-stop service for third-party developers to integrate various businesses of Montnets cloud communication platform quickly, efficiently and at low cost in the application.

The API adopts the current popular REST style design and implementation, which is concise and easy to understand. It supports the invocation of a variety of mainstream development languages, and supports three data transmission methods: JSON, XML, and x-www-form-urlencoded. Users can choose according to actual development needs. The appropriate data transfer method is compatible with the needs of most users for the API.
Enterprise customers can submit SMS to Montnets SMS gateway by calling Send_single API. After the Montnets gateway sends the short message to the mobile phone customer, the Montnets gateway will generate a status report describing whether the short message is sent successfully. The enterprise customer can obtain the status report in the following two ways: (1) Actively call get_rpt to get the short message to send. Status report of the result. (2) Passively receive the status report actively pushed by the Montnets gateway. (Enterprise customers need to provide the URL address to receive the status report).

The detailed description of the parameters of each API message is as follows:


2.1 Single send API send_single

2.1.1 Request URL


http://ip:port/sms/v2/std/send_single

The specific service IP and port of the Montnets gateway will be provided when the account is opened.


2.1.2 Request Method
POST/GET


2.1.3 Request Parameter Description


Parameter

Type

Necessary

Description

Example

userid

string

Yes

User account: up to 6 characters in length, in uppercase

e.g.J10003

pwd

string

Yes

Encrypted user password: fixed-length lowercase 32 characters. See password rules for details 3.1 Authentication rules

Example of password generation rule:

AccountJ10003

Password111111

Fixed string00000000

Timestamp0803192020

The corresponding string before MD5 encryption:

J10003000000001111110803192020

Password string after MD5 encryption: 26dad7f364507df18f3841cc9c4ff94d

mobile

string

Yes

Mobile phone number for SMS receiving: Only one mobile phone number can be filled in. See number rules for details “3.2 Mobile Number Rules

e.g.85292041234

content

string

Yes

SMS content: maximum support 1000 characters. Use UrlEncode to encode UTF-8 message content.

e.g.

SMS content: "Your verification code for this login is 1234"

After the SMS content is urlencode encoded:

%E2%80%9C%E6%82%A8%E6%9C%AC%E6%AC%A1%E7%99%BB%E5%BD%95%E7%9A%84%E9%AA%8C%E8%AF%81%E7%A0%81%E6%98%AF1234%E2%80%9D

timestamp

string

No

Timestamp24-hour format: MMDDHHMMSS, i.e. month, day, hour, minute, second, fixed length of 10 digits, left fill with 0 when each segment of month, day, hour, minute, and second is less than 2 digits

e.g.0803192020

svrtype

string

No

Business Type: Describe the content type of this SMS, which is a verification code, notification, or marketing

Verification code class: fill in as "1"

Notification class: fill in "2"

Marketing category: fill in "3"

exno

string

No

Fill in the OA or SenderID of this SMS. Can be left blank.

senderid

e.g.MontSMS

custid

string

No

User-defined serial number: the ID of the SMS in your business system, such as the order number or the serial number of the SMS sending record. After filling, the return value of the sending status will contain the user-defined serial number.

A maximum of 64-bit ASCII strings can be supported: letters, numbers, underscores, minus signs. If you don't need it, don't submit this field or fill in the blank

e.g.b3d0a2783d31b21b8573

exdata

string

No

Custom extension data: additionally provided ASCII strings with a maximum length of 64: letters, numbers, underscores, minus signs, as custom extension data, after filling in, the status report will return with this part of data, if not required Do not submit this field or fill in the blanks


2.1.4 Post Request Example


urlencode

 userid=J10003&pwd=26dad7f364507df18f3841cc9c4ff94d&mobile=85292041234&content=%e9%aa%8c%e8%af%81%e7%a0%81%ef%bc%9a6666%ef%bc%8c%e6%89%93%e6%ad%bb%e9%83%bd%e4%b8%8d%e8%a6%81%e5%91%8a%e8%af%89%e5%88%ab%e4%ba%ba%e5%93%a6%ef%bc%81×tamp=0803192020&svrtype=1&exno=0006&custid=b3d0a2783d31b21b8573&exdata=exdata000002


JSON


{"userid":"J10003","pwd":"26dad7f364507df18f3841cc9c4ff94d","mobile":"85292041234","content":"%e9%aa%8c%e8%af%81%e7%a0%81%ef%bc%9a6666%ef%bc%8c%e6%89%93%e6%ad%bb%e9%83%bd%e4%b8%8d%e8%a6%81%e5%91%8a%e8%af%89%e5%88%ab%e4%ba%ba%e5%93%a6%ef%bc%81","timestamp":"0803192020","svrtype":"1","exno":"0006","custid":"b3d0a2783d31b21b8573","exdata":"exdata000002"}


XML

 

	J10003
26dad7f364507df18f3841cc9c4ff94d 
85292041234
%e9%aa%8c%e8%af%81%e7%a0%81%ef%bc%9a6666%ef%bc%8c%e6%89%93%e6%ad%bb%e9%83%bd%e4%b8%8d%e8%a6%81%e5%91%8a%e8%af%89%e5%88%ab%e4%ba%ba%e5%93%a6%ef%bc%81
0803192020
1
0006
b3d0a2783d31b21b8573
exdata000002



2.1.5 GET Request Example


URLENCODE

 userid=J10003&pwd=26dad7f364507df18f3841cc9c4ff94d&mobile=85292041234&content=%e9%aa%8c%e8%af%81%e7%a0%81%ef%bc%9a6666%ef%bc%8c%e6%89%93%e6%ad%bb%e9%83%bd%e4%b8%8d%e8%a6%81%e5%91%8a%e8%af%89%e5%88%ab%e4%ba%ba%e5%93%a6%ef%bc%81×tamp=0803192020&svrtype=1&exno=0006&custid=b3d0a2783d31b21b8573&exdata=exdata000002


2.1.6 Return Parameter Description
After the Montnets gateway receives the sending SMS message submitted by the enterprise customer, it will return the receiving response message to the enterprise customer, the format is as follows:


Parameter

Type

Description

Example

result

int

SMS sending request processing result:

0Success

Non 0: failure, see details 4 Error code table

e.g.0

desc

string

Response result description, when the result is not 0, it is an error description

Encoding: urlencode (UTF-8)

e.g.

Authentication failed

urlencode(UTF-8) coding

%e9%89%b4%e6%9d%83%e5%a4%b1%e8%b4%a5

msgid

long

(64-bit)

SMS serial number: non 0, 64-bit integer, corresponding to long in Java and C#, cannot be parsed by int. When result is not 0, msgid is 0

e.g.9223372036854775808

 

custid

string

User-defined serial number: The default is the same as the custid in the request message. If there is no custid parameter in the request message or the value is empty, the unique number generated by Montnets to represent this batch of short messages will be returned. If result is not 0, the custid will be null

e.g.b3d0a2783d31b21b8573


2.1.7 Send Successful Return Example


JSON (Both urlencode and JSON requests return data in JSON)


 {
"result":0,
"desc":%e6%88%90%e5%8a%9f,
"msgid":9223372036854775808,
"custid":"b3d0a2783d31b21b8573"
}


XML




0
%e6%88%90%e5%8a%9f
9223372036854775808
b3d0a2783d31b21b8573


2.1.8 Send Failure Return Example


JSON (Both urlencode and JSON requests return data in JSON)

{
"result":-100999,
"desc":%e7%b3%bb%e7%bb%9f%e5%86%85%e9%83%a8%e9%94%99%e8%af%af,
"msgid":0,
"custid":""  

}

XML




-100999

%e7%b3%bb%e7%bb%9f%e5%86%85%e9%83%a8%e9%94%99%e8%af%af

0


2.2 Get a Status Report API get_rpt

2.2.1 Request URL


http://ip:port/sms/v2/std/get_rpt
The specific service IP and port of the Montnets gateway will be provided when the account is opened.


2.2.2 Request Method
POST/GET


2.2.3 Request Parameter Description


Parameter

Type

Necessary

Description

Example

userid

string

Yes

User account: up to 6 characters in length, in uppercase

e.g.J10003

pwd

string

Yes

Encrypted user password: fixed-length lowercase 32 characters. See password rules for details 3.1 Authentication rules

Example of password generation rule:

AccountJ10003

Password111111

Fixed string00000000

Timestamp0803192020

The corresponding string before MD5 encryption:

J10003000000001111110803192020

Password string after MD5 encryption:

26dad7f364507df18f3841cc9c4ff94d

timestamp

string

No

Timestamp: 24-hour format: MMDDHHMMSS, i.e. month, day, hour, minute, second, fixed length of 10 digits, if each segment of month, day, hour, minute, and second is less than 2 digits, add 0 to the left, and this parameter is required when MD5 encryption method is selected for the password , you do not need to fill in the password when the password is in plain text.

e.g.0803192020

retsize

int

No

The maximum number of status reports to be obtained in this request.

The maximum is 500, and if it exceeds 500, it will be returned as 500. When less than or equal to 0 or not filled, the system returns the default number of entries, the default is 500 entries

e.g.200


2.2.4 Post Request Example

urlencode

 userid=J10003&pwd=26dad7f364507df18f3841cc9c4ff94d×tamp=0803192020&retsize=300


JSON

 {"userid":"J10003","pwd":"26dad7f364507df18f3841cc9c4ff94d","timestamp":"0803192020","retsize":300}


XML

 

	J10003
26dad7f364507df18f3841cc9c4ff94d 
0803192020
300


2.2.5 GET Request Example

URLENCODE
userid=J10003&pwd=26dad7f364507df18f3841cc9c4ff94d×tamp=0803192020&retsize=300


2.2.6 Return Parameter Description

Montnets gateway receives client


Parameter

Type

Description

Example

result

int

Get the status report request processing result:

0Success

Non 0Failuresee details 4 Error code table

e.g.0

desc

string

Response result description, when the result is not 0, it is an error description

Encoding methodurlencode(GB2312)

e.g.

Authentication failed

urlencode(GB2312) coding

%e9%89%b4%e6%9d%83%e5%a4%b1%e8%b4%a5

rpts

string

rpts is empty when result is not 0

The format is shown in the table below


rpts package structure parameter description:


Parameter

Type

Description

Example

msgid

long

(64-bit)

Platform serial number: corresponding to the msgid in the result returned by the downlink request

e.g.9223372036854775808

Note: msgid allows negative numbers

custid

string

User-defined serial number: corresponding to the custid filled in the downlink request

e.g.

b3d0a2783d31b21b8573

pknum

int

For the long short messages submitted by enterprise customers, the number of pieces that are split and billed by the Montnets gateway.

 

pktotal

int

Reserved fields, the client does not need to process them.

 

mobile

string

Mobile number: Please refer to the number rules for details. 3.2 Mobile Number Rules

 

countrycode

int

International area code of mobile phone number: -1 means invalid number

e.g.86

spno

string

Null value, reserved field, the client does not need to process

 

exno

string

SenderID filled in when sending SMS

e.g.MontSMS

stime

string

Downlink sending time corresponding to the status report:

YYYY-MM-DD HH:MM:SS

e.g.2016-08-04 17:38:59

rtime

string

Status report return time:

YYYY-MM-DD HH:MM:SS

e.g.2016-08-04 17:39:01

status

int

Receive status

0:Success

Non 0:Failure

e.g.0

errcode

string

Status report error code

e.g.DELIVRD

errdesc

string

Description of the status report error code

Encoding method

If the authentication is successful, the encoding method is the same as the encoding method of the content of the issued request, otherwise it is urlencode (GBK plaintext)

e.g.

Submitted successfully: success

Failed to submit: outstanding bill

exdata

string

exdata filled in when going down

Table 7-3


2.2.7 Get Success Return Example
JSON (Both urlencode and JSON requests return data in JSON)


 {
"result":0,
"desc":%e6%88%90%e5%8a%9f,
"rpts": [
{
"msgid":9223372045854775808,
"custid":"b3d0a2783d31b21b8573",
"pknum":1,
"pktotal":2,
"mobile":"138xxxxxxxx",
"countrycode":86,
"spno":"1000457890006",
"exno":"0006",
"stime":"2016-08-04 17:38:55",
"rtime":"2016-08-04 17:38:59",
"status":0,
"errcode":"DELIVRD",
"errdesc":"success",
"exdata":"exdata0002"
},
{
"msgid":9223372045854875809,
"custid":"b3d0a2783d31b21b8574",
"pknum":2,
"pktotal":2,
"mobile":"138xxxxxxxx",
"countrycode":86,
"spno":"1000457890006",
"exno":"0006",
"stime":"2016-08-04 17:38:55",
"rtime":"2016-08-04 17:38:59",
"status":0,
"errcode":"DELIVRD",
"errdesc":"success",
"exdata":"exdata0002"
}
]
}
XML
 

0
%e6%88%90%e5%8a%9f

  
    9223372045854775808
b3d0a2783d31b21b8573
1
2
138xxxxxxxx
86
1000457890006
0006
2016-08-04 17:38:55
2016-08-04 17:38:59
0
DELIVRD
success
exdata0002


    9223372045854875809
b3d0a2783d31b21b8574
2
2
138xxxxxxxx
86
1000457890006
0006
2016-08-04 17:38:55
2016-08-04 17:38:59
0
DELIVRD
success
exdata0002
     


2.2.8 Get Failure Return Example

JSON (Both urlencode and JSON requests return data in JSON)
{
"result":-100999,
"desc":%e7%b3%bb%e7%bb%9f%e5%86%85%e9%83%a8%e9%94%99%e8%af%af,
"rpts":""
}


XML



-100999

%e7%b3%bb%e7%bb%9f%e5%86%85%e9%83%a8%e9%94%99%e8%af%af

   	


2.3 Push Status Report API

2.3.1 Function Description
After opening this API, Montnets gateway will push status report for you in real time. You need to provide a url address that accepts http post requests. The API can push up to 500 status reports at a time. In order not to affect the push speed, it is recommended to respond immediately after receiving the data, and the thread handles business logic asynchronously.


2.3.2 Push Method
POST
Data format: json


2.3.3 Request Parameter Description


Parameter

Type

Necessary

Description

Example

userid

string

Yes

User account: the maximum length is 6 bytes, in uppercase

e.g.J10003

pwd

string

Yes

User password: a fixed-length lowercase 32-bit string. See password rules for details 3.1 Authentication rules

Example of password generation rule:

AccountJ10003

Password111111

Fixed string00000000

Timestamp0803192020

The corresponding string before MD5 encryption:

J10003000000001111110803192020

Password string after MD5 encryption

26dad7f364507df18f3841cc9c4ff94d

After the client receives the message, it can authenticate the datagram to confirm that the source of the datagram is the real Montnets gateway.

timestamp

string

No

Timestamp: 24-hour format: MMDDHHMMSS, i.e. month, day, hour, minute, second, fixed length of 10 digits, if each segment of month, day, hour, minute, and second is less than 2 digits, add 0 to the left, and this parameter is required when MD5 encryption method is selected for the password

e.g.0803192020

cmd

string

Yes

Push status report request command: Montnets gateway fills in RPT_REQ

e.g.RPT_REQ

seqid

int

Yes

Request message serial number: The serial number of the status report message that the Montnets gateway pushes to the client. After the client receives the push of the status report, it needs to fill in the same message serial number when it returns the reception response packet to the Montnets gateway.

e.g.1004

rpts

string

Yes

Status report.

The format is shown in the table below


rpts package structure parameter description:


Parameter

Type

Description

Example

msgid

long

(64-bit)

Platform serial number: corresponding to the msgid in the result returned by the downlink request

e.g.9223372036854775808

Note: msgid allows negative numbers

custid

string

User-defined serial number: corresponding to the custid filled in the downlink request

e.g.b3d0a2783d31b21b8573

pknum

int

For the long short messages submitted by enterprise customers, the number of pieces that are split and billed by the Montnets gateway.

 

pktotal

int

Reserved fields, the client does not need to process them. (Total number of long short messages split)

 

mobile

string

Mobile number: Please refer to the number rules for details. 3.2 Mobile Number Rules

 

countrycode

int

International area code of mobile phone number: -1 means invalid number

e.g.86

spno

string

Empty value, reserved field

 

exno

string

exno filled in when going downlink

e.g.MontSMS

stime

string

Downlink sending time corresponding to the status report:

YYYY-MM-DD HH:MM:SS

e.g.2016-08-04 17:38:59

rtime

string

Status report return time:

YYYY-MM-DD HH:MM:SS

e.g.2016-08-04 17:39:01

status

int

Receive status:

0: success

Non 0: failure

e.g.0

errcode

string

Status report error code

e.g.DELIVRD

errdesc

string

Description of the status report error code

Encoding method:

Encoding according to different message formats:

XML/x-www-form-urlencoded:URELENCODE(UTF-8)

JSON:UTF-8

e.g.

Submitted successfully: success

Failed to submit: outstanding bill

exdata

string

exdata filled in when going downlink


2.3.4 Post Request Example

 {"userid":"J10003","pwd":"26dad7f364507df18f3841cc9c4ff94d","timestamp":"0803192020","cmd":"RPT_REQ","seqid":1004,"rpts":
[
    {
        "msgid": 9223372045854775808,
        "custid": "b3d0a2783d31b21b8573",
        "pknum": 1,
        "pktotal": 2,
        "mobile": "138xxxxxxxx",
        "countrycode": 86,
        "spno": "1000457890006",
        "exno": "0006",
        "stime": "2016-08-04 17:38:55",
        "rtime": "2016-08-04 17:38:59",
        "status": 0,
        "errcode": "DELIVRD",
        "errdesc": "success",
        "exdata": "exdata0002"
    },
    {
        "msgid": 9223372045854875808,
        "custid": "b3d0a2783d31b21b8573",
        "pknum": 1,
        "pktotal": 2,
        "mobile": "138xxxxxxxx",
        "countrycode": 86,
        "spno": "1000457890006",
        "exno": "0006",
        "stime": "2016-08-04 17:38:55",
        "rtime": "2016-08-04 17:38:59",
        "status": 0,
        "errcode": "DELIVRD",
        "errdesc": "success",
        "exdata": "exdata0002"
    }
]}


2.3.5 Return Parameter Description

After the client receives the status report pushed by the Monternet gateway, it needs to return a confirmation response to the Monternet gateway, in the following format


Parameter

Type

Necessary

Description

Example

cmd

string

Yes

RPT_RESP is required

RPT_RESP

seqid

int

Yes

Be consistent with the seqid in the request

 

result

int

Yes

Status report request processing result:

0: Success

Non 0: Failuresee details 4 Error code table


2.3.6 Push Success Return Example

{
"cmd":"RPT_RESP",
"seqid":1004,
"result":0
}


2.3.7 Push Failure Return Example


 {
"cmd":"RPT_RESP",
"seqid":1004,
"result": -100999
}


2.4 Bulk sending of the same content API send_batch

2.4.1 Request URL
http://ip:port/sms/v2/std/send_batch
The specific service IP and Port of the Montnets gateway will be provided together with the account opening.


2.4.3 Request Parameter Description


Parameter

Type

Necessary

Description

Example

userid

string

Yes

User account: up to 6 characters in length, in uppercase

e.g.J10003

pwd

string

Yes

Encrypted user password: fixed-length lowercase 32 characters. See password rules for details 3.1 Authentication rules

Example of password generation rule:

Account: J10003

Password: 111111

Fixed string: 00000000

Timestamp: 0803192020

The corresponding string before MD5 encryption:

J10003000000001111110803192020

Password string after MD5 encryption:

26dad7f364507df18f3841cc9c4ff94d

mobile

string

Yes

Mobile phone number to receive SMS: Multiple numbers are separated by commas, and the country code must be included. A maximum of 1000 numbers are supported at one time. See number rules for details 3.2 Mobile Number Rules

e.g.85292041234, 85292041235, 85292041236

content

string

Yes

SMS content: maximum support 1000 characters. Use UrlEncode to encode UTF-8 message content.

e.g.

SMS content: "Your verification code for this login is 1234"

After the SMS content is urlencode encoded:

%E2%80%9C%E6%82%A8%E6%9C%AC%E6%AC%A1%E7%99%BB%E5%BD%95%E7%9A%84%E9%AA%8C%E8%AF%81%E7%A0%81%E6%98%AF1234%E2%80%9D

timestamp

string

No

Timestamp: 24-hour format: MMDDHHMMSS, i.e. month, day, hour, minute, second, fixed length of 10 digits, left-fill 0 when each segment of month, day, hour, minute, and second is less than 2 digits

e.g.0803192020

svrtype

string

No

Business Type: Describe the content type of this SMS, which is a verification code, notification, or marketing

Verification code class: fill in as "1"

Notification class: fill in "2"

Marketing category: fill in "3"

exno

string

No

Fill in the OA or SenderID of this SMS. Can be left blank.

senderid

e.g.MontSMS

custid

string

No

User-defined serial number: the ID of the SMS in your business system, such as the order number or the serial number of the SMS sending record. After filling, the return value of the sending status will contain the user-defined serial number.

A maximum of 64-bit ASCII strings can be supported: letters, numbers, underscores, minus signs. If you don’t need it, you don’t need to submit this field or fill in the blanks

e.g.b3d0a2783d31b21b8573

exdata

string

No

Custom extension data: additionally provided ASCII strings with a maximum length of 64: letters, numbers, underscores, minus signs, as custom extension data, after filling in, the status report will return with this part of the data, if not required Do not submit this field or fill in the blanks


2.4.4 Post Request Example
JSON


{"userid":"J10003","pwd":"26dad7f364507df18f3841cc9c4ff94d","mobile":"85292041234,85292041235,85292041236","content":"%e9%aa%8c%e8%af%81%e7%a0%81%ef%bc%9a6666%ef%bc%8c%e6%89%93%e6%ad%bb%e9%83%bd%e4%b8%8d%e8%a6%81%e5%91%8a%e8%af%89%e5%88%ab%e4%ba%ba%e5%93%a6%ef%bc%81","timestamp":"0803192020","svrtype":"1","exno":"0006","custid":"b3d0a2783d31b21b8573","exdata":"exdata000002"}


2.4.5 Return Parameter Description

After the Montnets gateway receives the sending SMS message submitted by the enterprise customer, it will return the receiving response message to the enterprise customer, the format is as follows:


Parent node

Parameter

Type

Description

Example

No

result

int

SMS sending request processing result:

0: success

non-0: failure, see details 4 Error code table

e.g.0

No

desc

string

Response result description, when the result is not 0, it is an error description

Encoding method: urlencode (UTF-8)

e.g.

"Authentication failed"

urlencode (UTF-8) encoding:

%e9%89%b4%e6%9d%83%e5%a4%b1%e8%b4%a5

No

messages

Object-array

Array of message objects, empty on failure.

See the table below for instructions.

e.g.

[

    {

    "mobile":"85292041234"

    "msgid":9223372036854775808

    },

    {

    "mobile":"85292041235"

    "msgid":9675808854733720223

    }

]


Description of the messages field


Parent node

Parameter

Type

Description

Example

No

mobile

string

The mobile phone number for SMS receiving: carry the country code. See number rules for details 3.2 Mobile Number Rules

e.g.

85292041234

No

msgid

long

(64-bit)

SMS serial number: non 0, 64-bit unsigned integer decimal number. When result is not 0, msgid is 0

e.g.9223372036854775808


2.4.6 Send Successful Return Example
JSON (urlencode and JSON requests both return data in JSON)


 {
"result":0,
"desc":%e6%88%90%e5%8a%9f,
"messages":[
    {
        "mobile":"85292041234"
        "msgid":9223372036854775808
    },
    {
        "mobile":"85292041235"
        "msgid":9675808854733720223
    }
]
}


2.4.7 Send Failure Return Example

JSON (urlencode and JSON requests both return data in JSON)
{
"result":-100999,
"desc":%e7%b3%bb%e7%bb%9f%e5%86%85%e9%83%a8%e9%94%99%e8%af%af,
"messages":[]
}


2.4.2 Request Method

POST
Data format: json



3.1 Authentication rules 

1. The ciphertext value of the account + password is used for user authentication 
Userid fills in the plaintext of the account, and the password encryption method of pwd is as follows: the userid value is capitalized, the fixed string 00000000, the plaintext pwd and timestamp are spliced into a string in turn, and then MD5 encryption is performed. timestamp is a timestamp in 24-hour format. The format is: MMDDHHMMSS, that is, month, day, hour, minute, and second, with a fixed length of 10 digits. When each segment of month, day, hour, minute, and second is less than 2 digits, 0 is added to the left.
Remarks: Please fill in the dynamic and accurate time when sending the timestamp, do not fill in a fixed value, otherwise the time error is too large and the server may reject your request.



3.2 Mobile Number Rules

1. There are no restrictions on the type of number segment submitted for each request, but the system will verify the validity of each mobile phone number. If there is an illegal mobile phone number, it will be returned as a failure response.
2. When a customer sends a short message, the mobile field rule of the receiver number needs to conform to one of the following 3 formats:
(1) International telephone area code + mobile phone number, such as 85292041234
(2) 00+ or international telephone area code + mobile phone number, such as 0085292041234
(3) "+" + international telephone area code + mobile phone number, such as +85292041234


4. Error code table


Return error code

Error description

-100001

Authentication fails, please check whether the account, password, timestamp, fixed string, and MD5 algorithm are set according to the requirements of the document

-100002

User fails to pass multiple authentications, please check the account, password, timestamp, fixed string, and whether the MD5 algorithm is set according to the requirements of the document

-100004

Illegal to fill in the custid or exdata field

-100011

SMS content is too long

-100012

Invalid mobile phone number

-100014

The mobile number exceeds the maximum supported number (1000)

-100056

The number of connections logged in by the user account exceeds the limit

-100057

User account login IP is wrong

-100999

Platform database internal error

-100807

Exceeded number of numbers

-100268

Request message time expired

-100269

Timing time format error

-100270

Invalid expiration date format

-100271

SMS content is empty

-100272

No SMS verification code matched

-100273

DSC is 0, the content format of the SMS is not ASCII.

-100274

Mobile number does not meet the rules

-100100~-100090

Request message body format error


5. Precautions


1. The request message supports JSON, XML, and x-www-form-urlencoded. Use Content-type to identify the format of the request packet. For example, when using x-www-form-urlencoded, the format is as follows:


 POST /sms/v2/std/single_send HTTP/1.1
Host: 192.168.1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: length
2. To ensure that the status report can be obtained quickly and in time, please check whether the API returns a status report after calling the API. If there is a return, you need to keep getting it until the API returns no data, delay for 5 seconds, and then repeat the previous Get and judge operations.
3. To obtain the status report API get_rpt and push status report API, only one of the APIs can be used to obtain the callback status report. If a status report is pushed using the push status report API, the status report cannot be obtained by using the get_rpt API again. It is generally recommended to use the push status reporting API.
4. A single send API can only send one number at a time, otherwise the API will return failure.
5. The default number of concurrent connections for a single sending account is 100. If you need to adjust and increase the number of concurrent connections, please contact technical support.
6. This API is based on the http protocol and is suitable for development in any programming language that supports the http protocol, such as: C++, JAVA, C#, PHP, Python, NodeJS, R, JavaScript, Ruby, Go, Swift and other programming languages.


Second lightning experience

10 minutes for fast access

2 hours for commercial use

A2P SMS

5G message

Online Message
  • Company*

  • Tel*

  • Name*

  • Email*

  • Products*

    All the products
    • All the products
    • A2P SMS
    • 5G Message
    • International IOT
  • Content*

  • Please enter the verification code*