获取验证码
请求参数说明:
参数名 | 参数值 | 必传 | 参数说明 | 类型 |
---|---|---|---|---|
token | 接口返回的token值 | 是 | 用户登陆接口返回的token值 | string |
projectId | 项目ID | 是 | 与获取手机号时传入的projectId一致 | int64 |
phone | 手机号码 | 是 | 要获取验证码的手机号 | string |
请求示例:http://111.180.198.131:8080/getSMS
请求方式:POST
请求示例:
json
{
"token": "xxxxxxxxxxxx",
"projectId": 10000,
"phone": "13011223344"
}
返回示例:
json
{
"code": 200,
"message": "查询成功",
"rows": [
{
"FullMessage": "",
"SMS": "",
"cardType": 0,
"dockCodeId": "",
"id": 85,
"location": "山东青岛",
"phone": "18333333334",
"projectId": 10000
}
],
"total": 1
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
code | int | 状态码 |
message | string | 接口状态 |
cardType | int | 号码类型 |
dockCodeId | string | 项目对接码 |
id | int | 项目编号(非projectId) |
location | string | 归属地 |
phone | string | 手机号 |
projectId | int | 项目ID |
SMS | string | 验证码 |
fullMessage | string | 短信完整内容 |
失败返回:msg:错误提示|code:失败代号
失败代号说明:
失败代号 | 代号说明 |
---|---|
/ | 存在字段错误或缺少必填的字段 |
400 | Token不存在 |
没有收到短信都是以失败返回,短信等待时间有时较长,可以循环请求接口来获取验证码