Xsolla-logo
  • 文档
  • 创建帐户

通过用户名和密码进行认证

post/login

通过指定的用户名/电子邮箱和密码对用户进行认证。

Request
query Parameters
projectId
required
string <uuid>

发布商帐户中的登录管理器项目ID。

login_url
string

在帐户确认、成功认证、双因素认证配置或密码重置确认后将用户重定向到的URL。必须与发布商帐户URL部分中指定的回调URL相同。要找到它,请前往登录管理器 > 您的登录管理器项目,在导航页的顶部区块中选择回调部分。 如果有多个回调URL,此参数为必需

payload
string

Your custom data. The value of the parameter will be returned in the payload claim of the user JWT. Recommended maximum length less than 500 characters. Note, that this parameter is only available if you use a custom user data storage.

with_logout
string
Default: "0"

显示是否停用现有用户JWT值并激活此调用生成的值。可以是以下值:

  • 1,停用现有值并激活新值;
  • 0,保持现有值的激活状态。
Request Body schema: application/json
username
required
string

用户名或邮箱地址。

password
required
string

用户密码。

remember_me
boolean

用户是否同意保存认证数据。默认为false

Responses
200

确定

400

错误的请求

401

未授权

404

未授权

422

无法处理的实体

429

请求过多

Request samples
application/json
{
  • "password": "password123",
  • "remember_me": false,
  • "username": "John"
}
Response samples
application/json