Xsolla-logo
  • 文档
  • 创建帐户

通过设备ID进行认证

post/login/device/{device_type}

通过特定设备ID对用户进行身份认证。要启用静默认证,请按照说明进行操作。

Request
path Parameters
device_type
required
string

设备类型。

Enum: "android" "ios"
query Parameters
projectId
required
string <uuid>

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

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
device
required
string <= 100 characters

设备的制造商和型号名称。

device_id
required
string [ 16 .. 36 ] characters

设备ID:

Responses
200

确定

400

错误的请求

401

未授权

404

未找到

422

无法处理的实体

429

请求过多

Request samples
application/json
{
  • "device": "ONEPLUS A6003",
  • "device_id": "1AF516EFACD646F6"
}
Response samples
application/json
{
  • "token": "string"
}