forked from nxtele/http-api-document
-
Notifications
You must be signed in to change notification settings - Fork 1
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
- Request example HTTP form commit、C# code example
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
- Send Message
- Mark Incoming Message as Read
- Upload Media File
- Get Media File
- Delete Media File
- Webhook
- Query Number Information
- Query Message Template
- Create Message Template
- Edit Message Template
- Delete Message Template
- Upload Template Example File
- Embedded Page Login
- Create Client Application
- List of Phone Numbers for Client Application
- Get Verification Code
- Verify Verification Code
- Create Local Client
Short message
Voice
Call Center(NXLink)
- Web Iframe
- Manual Dial Record
- Manual Dial Record Query By orderId
- List Agent Information
- List Agent Status
- List Queue
- List Agents In Queue
- List Agent Efficiency
- Update Queue Agents
- Create AutoDial Task
- Webhook - Manual Dial
Call Center(Callbot)
- Callbot API Summary
- Callbot API Authorization
- Callbot API Ping
- Create Auto Dial Task
- Add Contact List To Task
- Create Task And Add Contact
- Start Or Pause Task
- Update Task Parameters
- Get List Task
- List Call
- List Task Orders
- Stop Order
- Get Call Detail By Order
- Webhook - By Call
- Webhook - By Order
- Webhook - Task Status
Flash Call
Short links
邮件验证码
DID号码
通用
号码检测