Skip to content

Sending SMS

dy.Zhuang edited this page Oct 14, 2022 · 4 revisions

Brief

  • Sending SMS

URL

  • http://api2.nxcloud.com/api/sms/mtsend

Http Request

  • POST, using http forms
  • Content-Type: application/x-www-form-urlencoded (Do not using json header !!!)
  • curl Example
curl -d "appkey=1&secretkey=2&phone=123&content=abc" http://api2.nxcloud.com/api/sms/mtsend

Parameters

Name Optional? Type Memo
appkey no string sms app: appkey
secretkey no string sms app: secretkey
phone no string to phone numebr (country code + number,e.g:8615088888888)
content no string content, must urlencode(UTF-8) max length 1000
source_address yes string from, sourceaddress/sender
sys_messageid yes string messageid in your system, if not provided, will auto generate one for you, length 10~50, only contains [0-9a-zA-Z-]
short_link yes string short link; should have short links in nxcloud before using it. Only works when content contains #1#
linkVerbose yes string whether gather which number clicks the short link. 1 yes, 0 no. Default is no
dr_url yes string dr webhook (this will override the webhook config in nxcloud console) only works for sending sms to single number
ext yes string only support via http api; will return when sending dr callback

Http Response Example

{"result":"请求成功","messageid":"20d6c660bd664c65bef20026564b0b79","code":"0"}

Response fields

Name Type Memo
result string detail message
messageid string sms message ID
code string result code

Memo

-HTTP response code

code Memo
0 Success
1 App is not available, or wrong appkey / secret
2 Paramters wrong or empty
3 No credit
4 Empty content or contains black list words
5 Content > 1000
6 Phone number invalid
7 Number size more than 50000
8 sourceaddress must be 1-20, numeric or alphabet
9 IP invalid
88 submit failed
99 system error

-SMPP wrong code

code Memo
10 [0x0000000A] sourceaddress (sender) error
81 [0x00000051] Phone number error
103 [0x00000067] No credit
260 [0x00000104] Empty content or contains black list words
69 Unkonwn error, please contact noc

Introduction

WhatsApp

Short message

Voice

Call Center(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally