User Sign Up
User Sign Up
POST /bp/server/user/signup
接口功能:注册 BytePower
请求头部参数 (Headers):
- Accept:声明客户端接受的返回数据类型(JSON)和 API 版本, 示例值:"application/vnd.bytepower.v1+json"。
- X-BytePower-Auth-Token:JWT token,用于 AppServer 到 BytePower service 的请求,对于 AppServer 到 BytePower 服务端的请求是必须的参数, 示例值:"jwtheader.jwtpayload.jwtsignature"。
请求体
content-type: "application/json"
描述:用户注册所需信息
请求体示例: 支持用户名密码注册和邮箱注册
js
{
"name_password": {
"name": "username",
"password": "123456"
},
"segment_id": "test_segment_id",
"custom_config_id": "custom_config_id_123",
"login_device_id": "login_device_id", // 配合 device 登录使用,设备登录中 id 与 login_device_id 是同一个 id,取值相同。
"simple_cuid": "test_simple_cuid",
"cuid_v2": "test_custom_uid_v2",
"imei": "test_imei",
"oaid": "test_oaid",
"cuid": "test_custom_uid",
"platform": "ios",
"idfa": "test_idfa",
"idfv": "test_idfv",
"gaid": "test_gaid",
"appsflyer_id": "appsflyer_id",
"app_instance_id": "app_instance_id",
"uuid": "uuid"
}
或
{
"email_password": {
"email": "mou@ihandysoft.com",
"password": "123456",
"verify_code": "123456", // 可选,console 开启 Enable sign up verification 后才会生效
"platform": "website" // 可选
},
"segment_id": "test_segment_id",
"custom_config_id": "custom_config_id_123",
"login_device_id": "login_device_id", // 配合 device 登录使用,设备登录中 id 与 login_device_id 是同一个 id,取值相同。
"simple_cuid": "test_simple_cuid",
"cuid_v2": "test_custom_uid_v2",
"imei": "test_imei",
"oaid": "test_oaid",
"cuid": "test_custom_uid",
"platform": "ios",
"idfa": "test_idfa",
"idfv": "test_idfv",
"gaid": "test_gaid",
"appsflyer_id": "appsflyer_id",
"app_instance_id": "app_instance_id",
"uuid": "uuid"
}
响应
HTTP 状态码:200
描述:注册成功 响应示例:
json
{
"user": {
"uid": "u12345",
"name": "happymumu",
"social_accounts": [
//省略部分详细信息...
],
"phone": {
"phone_number": "+8615512345678"
},
"email": "feng.zhou@ihandysoft.com",
"cuid": "test_custom_uid"
}
}
HTTP 状态码:400 描述:400 错误 响应示例:
json
{
"error": {
"error_type": "invalid_api_version",
"message": "api version is not valid."
}
}
- HTTP 状态码:405 描述:请求方法错误 响应示例:
json
{
"error": {
"error_type": "method_not_allowed",
"message": "string"
}
}
- HTTP 状态码:500 描述:500 错误 响应示例:
json
{
"error": {
"error_type": "config_invalid",
"message": "configuration is not valid."
}
}
- HTTP 状态码:502 描述:gateway 失败 响应示例:
json
{
"error": {
"error_type": "gateway",
"message": "string"
}
}