发送语音群呼 - nxtele/http-api-document GitHub Wiki
简要描述:
- 语音群呼接口
请求方式:
- URL:
http://api.nxcloud.com/api/voiceSms/gpsend
- Method:
POST
- Content-Type:
application/x-www-form-urlencoded
参数:
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
appkey | 是 | string | 语音应用appkey |
secretkey | 是 | string | 语音应用secretkey |
phone | 是 | string | 手机号,可以上传多个,并且以逗号隔开(,) |
country_code | 是 | string | 国码(不带+号,纯国码数字即可) |
show_phone | 是 | string | 想要显示的号码(填写任意位数的数字即可,实际显示号码可能会被修改,号码不能超过50位) |
url | 是 | string | 语音文件url,从控制台获取 |
task_time | 否 | string | 定时时间yyyy-MM-dd HH:mm:ss |
time_zone | 否 | string | 时区(8、9、10.....),如果task_time传值,time_zone就必填 |
sched_hangup | 否 | string | 定时接通后多少秒挂断(为0则不限制) |
sms_appkey | 否 | string | 短信应用APPKEY |
msg_content | 否 | string | 追加短信内容 |
请求示例:
curl --location --request POST 'http://api.nxcloud.com/api/voiceSms/gpsend' \
--data-urlencode 'appkey=asdf' \
--data-urlencode 'secretkey=qwer' \
--data-urlencode 'phone=6212345678' \
--data-urlencode 'country_code=62' \
--data-urlencode 'show_phone=123456' \
--data-urlencode 'url=https://nxcloud.com/1963370420.m4a'
请求成功返回示例
{
"code": "0",
"messageid": "69c057be1d984a5baf6d9e1384e5c456",
"message": "Success"
}
请求异常返回示例
{
"code": "23",
"messageid": "",
"message": "Country code error"
}
返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
message | string | 请求结果说明 |
messageid | string | 系统返回的语音ID |
code | string | 结果编码 |
备注
- 错误代码
code | message |
---|---|
0 | Success |
1 | APP unavailable |
2 | Request parameter error |
3 | Insufficient balance |
4 | The content is empty or contains illegal keys |
5 | Content too long |
6 | Phone number error |
9 | IP illegal |
20 | URL fail |
22 | Router missed |
23 | Country code error |
29 | Task time no more than now |
31 | Task zone not empty |
77 | File error |
78 | The number cannot exceed 20,000 |
88 | Failure |
99 | System error |
102 | Account unavailable |