Skip to content

发送验证码 ​

调用此接口 ,传入手机号码, 可发送验证码

接口信息 ​

项目值
接口地址/captcha/sent
请求方式GET / POST
需要登录否
对应模块captcha_sent
文档分类用户与登录

请求参数 ​

参数类型必填默认值说明
phonestring✅-手机号码
ctcodestring—86国家区号,默认 86 即中国

HTTP 示例 ​

bash
GET /captcha/sent?phone=13xxx

编程式调用 ​

ts
import { captchaSent } from 'hana-music-api';

const result = await captchaSent({
  phone: '13xxx',
});

console.log(result.body);

返回内容 ​

json
{ "code": 200, "data": true }

code 是收紧字段,data 是宽松字段(可能缺失或是 null)。结构定义和类型是 CaptchaSentBody,见 返回体结构。

补充说明 ​

说明 : 调用此接口 ,传入手机号码, 可发送验证码

必选参数 : phone: 手机号码

可选参数 :ctcode: 国家区号,默认 86 即中国

接口地址 : /captcha/sent

调用例子 : /captcha/sent?phone=13xxx

Released under the MIT License.