注册新用户
POST/auth/v1/signup
注册新用户
Request
Query Parameters
client_id string
应用对应的客户端id,默认为环境id,可以不传
Header Parameters
x-device-id stringrequired
设备id
- application/json
Body
email 邮箱 (string)
phone_number 手机号 (string)
username 用户名 (string)nullable
verification_token 接收到的验证码Token (string)
password optional password 密码 (string)
name optional 昵称, 可选 (string)nullable
gender optional 头像, 符合css编码格式 (string)
picture optional 头像, 符合css编码格式 (string)
locale optional 地区, 可选 (如果地区为空, 则h后端会根据手机号码,ip地址等多种因素, 选择初始化地区)
格式: zh (string)
provider_token 如果之前获取过三方信息, 则可以将三方信息绑定到该账号 (string)
Responses
- 200
- 500
A successful response.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
token_type token类型, 如Bearer类型 (string)
access_token 获取的jwt access_token (string)
refresh_token access_token对应的refresh_token, access_token过期可通过refresh_token刷新获取新的access_token (string)
id_token 用户身份信息的声明 (string)
expires_in int32
scope 授权范围 (string)
sub 用户的唯一id (string)
groups string[]
{
"token_type": "string",
"access_token": "string",
"refresh_token": "string",
"id_token": "string",
"expires_in": 0,
"scope": "string",
"sub": "string",
"groups": [
"string"
]
}
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...