文档

​
​

Development

User Acquisition

Monetization

工业

Player Authentication Admin API

v1

受支持
​

Player Authentication Admin API

v1

受支持
​

此页面不支持所选语言。
Unity Services Web APIs
​
​
Player Authentication Admin API
  • Introduction
mdx:openapi:endpoints
  • Player Authentication Admin

Player Authentication Admin API

Introduction

This is the Admin API specification for the Unity Authentication service that allows player authentication. To use this API, you must first enable it through the Unity Gaming Services dashboard.
For more information about how to set up Service Account Authentication, please read here: https://services.docs.unity.com/docs/service-account-auth

Rate Limits

The API has rate limiting in place. Request are limited to 10 requests per second, and 500 requests per 30 minute period.
The API responds with a
429
HTTP status code if the rate limit is exceeded.
It will also respond with a
Retry-After
header to be used in conjunction with a client's retry logic. The value is the number of seconds until a request for the given player will be accepted.
Download OpenAPI specification:

List Players


Return a list of the project's players and their information.
Authorizations
Admin (player_auth.users.list)
HTTP: Admin
HTTP Authorization Scheme: basic
Required scopes: player_auth.users.list

Path parameters for "{title}"

projectId

string
必填
example: 8bdacc33-6eef-4577-beb0-633c86259f5b
Id of the project.

Query parameters for "{title}"

limit

integer
The number of players to return.

page

string
(Optional) The next page token. If not set, returns players without any offset.

username

string
example: SomeUsername1
Username of the player.

externalId

string
example: SomeExternalId
External Provider player id.

idProvider

string
example: google
External provider name among the supported ones.

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/player-identity/v1/projects/{projectId}/users"

Response example

{ "next": "xxxxxxxx", "results": [ { "id": "eyJhbGciOiJIUzI1N", "disabled": false, "externalIds": [ { "providerId": "provider-id" } ], "createdAt": "123000000", "lastLoginAt": "123000000" } ]}

Get Player


Get the current player's information.
Authorizations
Admin (player_auth.users.get)
HTTP: Admin
HTTP Authorization Scheme: basic
Required scopes: player_auth.users.get

Path parameters for "{title}"

playerId

string
必填
example: 99i9ju8juh
This is the player Id.

projectId

string
必填
example: 8bdacc33-6eef-4577-beb0-633c86259f5b
Id of the project.

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/player-identity/v1/projects/{projectId}/users/{playerId}"

Response example

{ "disabled": false, "externalIds": [ { "externalId": "5eb26a338a232", "providerId": "provider-Id" } ], "id": "eyJhbGciOiJIUzI1N", "createdAt": "123000000", "lastLoginAt": "123000000", "usernamePasswordLoginMetadata": { "username": "New_User_57", "createdAt": "123000000", "lastLoginAt": "123000000", "passwordUpdatedAt": "123000000" }}

Delete Player


Delete a player. [WARNING] The account deletion API only deletes the player's Unity Authentication account. It is your obligation to ensure that you delete all associated player data that is connected to the player's Unity Authentication account and other UGS services you use, such as Economy and Cloud Save.
Authorizations
Admin (player_auth.users.delete)
HTTP: Admin
HTTP Authorization Scheme: basic
Required scopes: player_auth.users.delete

Path parameters for "{title}"

playerId

string
必填
example: 99i9ju8juh
This is the player Id.

projectId

string
必填
example: 8bdacc33-6eef-4577-beb0-633c86259f5b
Id of the project.

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X DELETE \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/player-identity/v1/projects/{projectId}/users/{playerId}"

Response example

{}

Enable Player


Enable the player.
Authorizations
Admin (player_auth.users.enable)
HTTP: Admin
HTTP Authorization Scheme: basic
Required scopes: player_auth.users.enable

Path parameters for "{title}"

playerId

string
必填
example: 99i9ju8juh
This is the player Id.

projectId

string
必填
example: 8bdacc33-6eef-4577-beb0-633c86259f5b
Id of the project.

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/player-identity/v1/projects/{projectId}/users/{playerId}/enable"

Response example

{ "disabled": false, "externalIds": [ { "externalId": "5eb26a338a232", "providerId": "provider-Id" } ], "id": "eyJhbGciOiJIUzI1N", "createdAt": "123000000", "lastLoginAt": "123000000", "usernamePasswordLoginMetadata": { "username": "New_User_57", "createdAt": "123000000", "lastLoginAt": "123000000", "passwordUpdatedAt": "123000000" }}

Disable Player


Disable the player.
Authorizations
Admin (player_auth.users.disable)
HTTP: Admin
HTTP Authorization Scheme: basic
Required scopes: player_auth.users.disable

Path parameters for "{title}"

playerId

string
必填
example: 99i9ju8juh
This is the player Id.

projectId

string
必填
example: 8bdacc33-6eef-4577-beb0-633c86259f5b
Id of the project.

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/player-identity/v1/projects/{projectId}/users/{playerId}/disable"

Response example

{ "disabled": false, "externalIds": [ { "externalId": "5eb26a338a232", "providerId": "provider-Id" } ], "id": "eyJhbGciOiJIUzI1N", "createdAt": "123000000", "lastLoginAt": "123000000", "usernamePasswordLoginMetadata": { "username": "New_User_57", "createdAt": "123000000", "lastLoginAt": "123000000", "passwordUpdatedAt": "123000000" }}

Change Password


Change Username Password account password
Authorizations
Admin (player_auth.password.update)
HTTP: Admin
HTTP Authorization Scheme: basic
Required scopes: player_auth.password.update

Path parameters for "{title}"

playerId

string
必填
example: 99i9ju8juh
This is the player Id.

projectId

string
必填
example: 8bdacc33-6eef-4577-beb0-633c86259f5b
Id of the project.

Request body for "{title}"

Media Type:
application/json

newPassword

string
example: TheNewPassword456@
The password to be changed. Length must be between 8-30 and contain at least one uppercase letter, at least one lowercase letter, at least one number and at least one symbol.

HTTP response status codes for "{title}":

Code samples for "{title}":

Request example

curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '{ "newPassword": "TheNewPassword456@"}' \ "https://services.api.unity.com/player-identity/v1/projects/{projectId}/users/{playerId}/change-password"

Response example

{ "title": "Bad Request", "status": 400, "detail": "Something is wrong", "details": [ { "code": "ERROR_CODE_123", "path": "nested.value", "message": "Invalid value" } ]}

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。