Xsolla-logo

注册新用户

post/oauth2/user

Creates a new user.

  • If you store user data at Xsolla or in custom storage, the user will receive an account confirmation email.
  • If you store user data at PlayFab, you can set up sending the account confirmation email to the user. Use the PlayFab instruction for this.
  • If you store user data at Firebase, the user will receive an account confirmation message from Firebase side.

See the Comparison of user data storages page for more information about user data storages.

Request
query Parameters
response_type
required
string

启用了OAuth 2.0协议项目中使用的授权类型。必须是code才能在响应中获取用户认证代码。必须通过生成JWT调用将收到的代码交换给JWT以完成用户认证。

client_id
required
integer

您的应用程序ID。在创建OAuth 2.0客户端后获取。

state
required
string

用于额外用户验证的值。通常用于抵御CSRF攻击。该值将在响应中返回。必须长于8个符号。

scope
string

范围是OAuth 2.0中的一种机制,用于限制应用程序对用户帐户的访问。

可以是:

如果您要处理上面未提及的自定义scope参数值,可以在使用此调用时设置这些参数。艾克索拉登录管理器服务器不会处理这些值,但会在收到的JWT中返回它们。

audience
string

The "aud" (audience) claim identifies the recipients that the JWT is intended for. Each principal intended to process the JWT MUST identify itself with a value in the audience claim. If the principal processing the claim does not identify itself with a value in the "aud" claim when this claim is present, then the JWT MUST be rejected. In the general case, the "aud" value is an array of case- sensitive strings, each containing a StringOrURI value. In the special case when the JWT has one audience, the "aud" value MAY be a single case-sensitive string containing a StringOrURI value. The interpretation of audience values is generally application specific. Use of this claim is OPTIONAL.

redirect_uri
string

URL to redirect the user to after account confirmation, successful authentication, or password reset confirmation. To set up this parameter, contact your Account Manager.

Notice. The parameter is required if you have more than one redirect URI in your project settings.
Request Body schema: application/json
username
required
string [ 1 .. 255 ] characters

用户名。

password
required
string [ 6 .. 100 ] characters

用户密码。

email
required
string [ 1 .. 255 ] characters

用户邮箱地址。

accept_consent
boolean

用户是否同意处理其个人数据。

fields
object

用于详细注册表单的参数。要使用此功能,请联系您的帐户经理。

promo_email_agreement
integer >= 0
Default: 1

用户同意接收电子简讯。

Enum: 0 1
Responses
200

确定(禁用了帐户确认)

204

无内容(启用了帐户确认)

400

错误的请求

404

未找到

422

无法处理的实体

429

请求过多

Request samples
application/json
{
  • "email": "john-email@email.com",
  • "fields": {
    },
  • "password": "password123",
  • "username": "John"
}
Response samples
application/json
{
  • "login_url": "string"
}