users

Change Phone Send Verification Code

修改手机号时发送验证码到新手机号

  1. 验证当前密码是否正确
  2. 检查新手机号是否已被其他用户使用
  3. 生成UUID作为验证码标识
  4. 生成4位随机验证码
  5. 存储UUID-{phone_num, code, expires_at}的键值对
  6. 调用短信发送接口
  7. 返回成功消息
  8. 如果当前密码不正确 返回401错误
  9. 如果新手机号已被使用 返回400错误
  10. 如果发送短信失败 返回500错误
post/api/v1/users/change-phone-send-verification-code

Request

  • Base URL: https://opencloudos.org (the document declares no server; this is the origin it was published from)
  • URL: https://opencloudos.org/api/v1/users/change-phone-send-verification-code
  • Auth: OAuth 2 (password, token URL /api/v1/users/login)

Request body

passwordstring required
new_phone_numstring required

Response

Successful Response

messagestring required

Changes

No recorded changes to this operation across all 1 revision of this API.