重置密码
POST/auth/v1/reset
重置某个用户的密码, 需要邮箱或手机及对应的验证码。
- 参考接口, 获取短信或邮箱验证码
Request
Query Parameters
client_id string
应用对应的客户端id,可从云开发平台-->身份认证-->开发设置获取。默认为环境id,可以不传
Header Parameters
x-device-id string
设备id,当前登录设备的id。客户端应随机生成,并缓存到客户端。此参数与登录账号数有关
- application/json
Body
email string
使用邮箱验证使用
phone_number string
使用手机号验证使用
new_password string
新密码
verification_token string
短信或邮箱验证码
Responses
- 200
- 400
- 403
- 500
A successful response.
Response Headers
- application/json
- Schema
Schema
- any
- email and phone number can not be set and same time,邮箱或手机号不能同时为空
- verification required,手机号或邮箱验证码为空
- phone or email does not match validation code,手机号或邮箱和验证码对应的手机或邮箱不匹配
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
error 错误信息 (string)
error_code int32
error_description 错误描述 (string)
{
"error": "string",
"error_code": 0,
"error_description": "string"
}
{
"error": "invalid_argument",
"error_code": 3,
"error_description": "email or phone number is empty"
}
Response Headers
- application/json
- Schema
- Example (from schema)
- Example
Schema
object
{}
{
"error": "permission_denied",
"error_code": 7,
"error_description": "cors permission denied, please check if lowcode-5g9ac20u2a27da47-1307578329.tcloudbaseapp.com in your client AOJ8yAABzNsMXf0IcKc domains"
}
An unexpected error response.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
error 错误信息 (string)
error_code int32
error_description 错误描述 (string)
{
"error": "string",
"error_code": 0,
"error_description": "string"
}
Loading...