获取手机验证码(一)

# Get mobile verification code **Brief description**: - be careful: - Do not use the mobile phone verification code to log in the newly registered device. There will be slider verification - For new equipment, the general equipment needs to wait for more than n days, and then it can send the verification code to log in directly - Mobile verification code login can support mobile devices online at the same time. - A device can log in to multiple accounts. The default is the latest login account - If you need to view the account list bound to the device, please view the device information - consult the customer service provider - **request URL**: - {APIURL}/dy/login/send_mobile_code2 **Request mode** - POST **Request header Headers** - Content-Type:multipart/form-data **Parameter**: |Parameter name | required | type | description |-|-|-|-| |wcid|Y|string| wcid |mobile|Y|string|手机号码 { "mobile": "17315815xxx", "wcid": "15301122852703477sw" } **Return data**: |Parameter name | type | description| |-|-|-| |code|int|0 success,-1 fail 1-Prompt message| |msg|string|feedback information| **Request parameter example** ``` { "mobile": "18021111111", "wcid": "1223232323334" } ``` - 返回发送验证码成功 - 记下 proxy_ip ,提交验证码 需要一致 ``` { "code": 0, "data": { "data": { "mobile": "180******11", "mobile_ticket": "mobile_ticket_YEFGBG6FCCZA4HANNDUK2X8XNB95T2UZ", "retry_time": 60 }, "message": "success", "proxy_ip": "123.180.211.251:43131" }, "msg": "success" } ``` - 返回需要 发送 YZ 到 106xxxxx的 进行校验;但是我们可以不进行校验, 而是可以再尝试重新获取,最多尝试5次 直到获取到验证码为止 ``` { "code": 0, "data": { "data": { "captcha": "", "channel_mobile": "10690032183903", "desc_url": "", "description": "", "error_code": 2030, "mobile": "173********", "sms_content": "YZ", "verify_ticket": "VTIDEF2E4EHYE65CHRVXXDWYS6TDEBD2XQ334D" }, "message": "error", "proxy_ip": "59.58.43.147:4313" }, "msg": "success" } ``` - 系统繁忙, 当系统繁忙 则等一会再获取 ``` { "code": 0, "data": { "data": { "captcha": "", "desc_url": "", "description": "系统繁忙,请稍后再试", "error_code": 7 }, "message": "error", "proxy_ip": "114.234.33.236:43131" }, "msg": "success" } ``` **错误返回示例** ```{ "msg": "调用失败", "code": -1, "data": null } ```