Class PlayerAuthenticationAdminApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.Admin.PlayerAuthentication
Assembly: Unity.Services.Apis.dll
Syntax
public class PlayerAuthenticationAdminApi : IPlayerAuthenticationAdminApi, IApiAccessor
Constructors
PlayerAuthenticationAdminApi(IApiClient)
Initializes a new instance of the Player
Declaration
public PlayerAuthenticationAdminApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
PlayerAuthenticationAdminApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Player
Declaration
public PlayerAuthenticationAdminApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
IApi |
apiConfiguration | The configuration object. |
Properties
Client
The client for accessing this underlying API asynchronously.
Declaration
public IApiClient Client { get; }
Property Value
Type | Description |
---|---|
IApi |
Configuration
Gets the configuration object
Declaration
public IApiConfiguration Configuration { get; }
Property Value
Type | Description |
---|---|
IApi |
An instance of the Configuration |
Methods
ChangePassword(string, string, PlayerAuthChangePasswordRequest, CancellationToken)
Change Password Change Username Password account password
Declaration
public ApiOperation ChangePassword(string playerId, string projectId, PlayerAuthChangePasswordRequest playerAuthChangePasswordRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | This is the player Id. |
string | projectId | Id of the project. |
Player |
playerAuthChangePasswordRequest | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeletePlayer(string, string, CancellationToken)
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.
Declaration
public ApiOperation<object> DeletePlayer(string playerId, string projectId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | This is the player Id. |
string | projectId | Id of the project. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DisablePlayer(string, string, CancellationToken)
Disable Player Disable the player.
Declaration
public ApiOperation<PlayerAuthPlayerProjectResponse> DisablePlayer(string playerId, string projectId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | This is the player Id. |
string | projectId | Id of the project. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
EnablePlayer(string, string, CancellationToken)
Enable Player Enable the player.
Declaration
public ApiOperation<PlayerAuthPlayerProjectResponse> EnablePlayer(string playerId, string projectId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | This is the player Id. |
string | projectId | Id of the project. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
GetPlayer(string, string, CancellationToken)
Get Player Get the current player's information.
Declaration
public ApiOperation<PlayerAuthPlayerProjectResponse> GetPlayer(string playerId, string projectId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | This is the player Id. |
string | projectId | Id of the project. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
ListPlayers(string, int?, string, string, string, string, CancellationToken)
List Players Return a list of the project's players and their information.
Declaration
public ApiOperation<PlayerAuthListProjectUserResponse> ListPlayers(string projectId, int? limit = null, string page = null, string username = null, string externalId = null, string idProvider = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Id of the project. |
int? | limit | The number of players to return. (optional) |
string | page | (Optional) The next page token. If not set, returns players without any offset. (optional) |
string | username | Username of the player. (optional) |
string | externalId | External Provider player id. (optional) |
string | idProvider | External provider name among the supported ones. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |