Interface IPlayerAuthenticationApi
Represents a collection of functions to interact with the API endpoints
Namespace: Unity.Services.Apis.PlayerAuthentication
Assembly: Unity.Services.Apis.dll
Syntax
public interface IPlayerAuthenticationApi : IApiAccessor
Methods
CodeConfirmation(string, string, string, CodeLinkConfirmationRequest, CancellationToken)
Code Confirmation
Declaration
ApiOperation CodeConfirmation(string projectId, string unityEnvironment = null, string authorization = null, CodeLinkConfirmationRequest codeLinkConfirmationRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
string | authorization | This is the bearer token for the user authorized to call this API. (optional) |
Code |
codeLinkConfirmationRequest | Code confirmation request. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeletePlayer(string, string, string, CancellationToken)
Delete Player
Declaration
ApiOperation DeletePlayer(string playerId, string projectId, string authorization = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | This is the player id. |
string | projectId | This is the Unity Project Id. It is a uuid format. |
string | authorization | This is the bearer token for the user authorized to call this API. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GenerateCode(string, string, GenerateCodeRequest, CancellationToken)
Generate Code
Declaration
ApiOperation<GenerateCodeResponse> GenerateCode(string projectId, string unityEnvironment = null, GenerateCodeRequest generateCodeRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
Generate |
generateCodeRequest | Generate Code Request Body (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetCodeInfo(string, CodeLinkInfoRequest, string, CancellationToken)
Get Code Info
Declaration
ApiOperation<CodeLinkInfoResponse> GetCodeInfo(string projectId, CodeLinkInfoRequest codeLinkInfoRequest, string unityEnvironment = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
Code |
codeLinkInfoRequest | Code Link Request for Sign In |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetJSONWebKeySet(CancellationToken)
Get JWKS
Declaration
ApiOperation<JSONWebKeySet> GetJSONWebKeySet(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetPlayer(string, string, string, CancellationToken)
Get Player
Declaration
ApiOperation<PlayerResponse> GetPlayer(string playerId, string projectId, string authorization = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | This is the player id. |
string | projectId | This is the Unity Project Id. It is a uuid format. |
string | authorization | This is the bearer token for the user authorized to call this API. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
LinkExternalId(string, string, LinkExternalIdRequest, string, CancellationToken)
Link External Id
Declaration
ApiOperation<LinkExternalIdResponse> LinkExternalId(string idProvider, string projectId, LinkExternalIdRequest linkExternalIdRequest, string authorization = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | idProvider | This is the id provider type. |
string | projectId | This is the Unity Project Id. It is a uuid format. |
Link |
linkExternalIdRequest | Link External Id request body |
string | authorization | This is the bearer token for the user authorized to call this API. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
ReadNotifications(string, string, string, CancellationToken)
Read Notification
Declaration
ApiOperation<ReadNotificationsResponse> ReadNotifications(string playerId, string projectId, string authorization = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | This is the player id. |
string | projectId | This is the Unity Project Id. It is a uuid format. |
string | authorization | This is the bearer token for the user authorized to call this API. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SignInWithCode(string, string, SignInWithCodeRequest, string, CancellationToken)
Sign In With Code
Declaration
ApiOperation<AuthenticationResponse> SignInWithCode(string projectId, string codeLinkSessionId, SignInWithCodeRequest signInWithCodeRequest, string unityEnvironment = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
string | codeLinkSessionId | An identifier for the device requesting the code sign in. |
Sign |
signInWithCodeRequest | Code Link Request for Sign In |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SignInWithCustomID(string, CustomIDRequest, string, CancellationToken)
Custom ID Sign In
Declaration
ApiOperation<AuthenticationResponse> SignInWithCustomID(string projectId, CustomIDRequest customIDRequest, string unityEnvironment = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
Custom |
customIDRequest | Custom ID Request for Sign In |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SignInWithExternalToken(string, string, SignInWithExternalTokenRequest, string, CancellationToken)
External Token Sign In
Declaration
ApiOperation<AuthenticationResponse> SignInWithExternalToken(string idProvider, string projectId, SignInWithExternalTokenRequest signInWithExternalTokenRequest, string unityEnvironment = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | idProvider | This is the id provider type. |
string | projectId | This is the Unity Project Id. It is a uuid format. |
Sign |
signInWithExternalTokenRequest | External Token Authentication request body |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SignInWithSessionToken(string, SignInWithSessionTokenRequest, string, CancellationToken)
Session Token Sign In
Declaration
ApiOperation<AuthenticationResponse> SignInWithSessionToken(string projectId, SignInWithSessionTokenRequest signInWithSessionTokenRequest, string unityEnvironment = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
Sign |
signInWithSessionTokenRequest | Session Token Authentication request body |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SignInWithUsernamePassword(string, UsernamePasswordRequest, string, CancellationToken)
Username Password Sign In
Declaration
ApiOperation<AuthenticationResponse> SignInWithUsernamePassword(string projectId, UsernamePasswordRequest usernamePasswordRequest, string unityEnvironment = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
Username |
usernamePasswordRequest | The Username and Password of the player. |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SignUpAnonymously(string, string, SignUpAnonymouslyRequest, CancellationToken)
Anonymous Sign Up
Declaration
ApiOperation<AuthenticationResponse> SignUpAnonymously(string projectId, string unityEnvironment = null, SignUpAnonymouslyRequest signUpAnonymouslyRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
Sign |
signUpAnonymouslyRequest | Anonymous Sign Up request body (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SignUpWithUsernamePassword(string, UsernamePasswordRequest, string, string, CancellationToken)
Username Password Sign Up
Declaration
ApiOperation<AuthenticationResponse> SignUpWithUsernamePassword(string projectId, UsernamePasswordRequest usernamePasswordRequest, string unityEnvironment = null, string authorization = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
Username |
usernamePasswordRequest | The Username and Password of the player. |
string | unityEnvironment | This is the Environment you want to authorize a player to access. It is the name of the Environment. If this header is not specified, then the default Environment is used. An invalid environment name is not an acceptable input. (optional) |
string | authorization | This is the bearer token for the user authorized to call this API. When this is provided, a user associated with the bearer token is used instead of creating a new user. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
UnlinkExternalId(string, string, UnlinkExternalIdRequest, string, CancellationToken)
Unlink External Id
Declaration
ApiOperation<UnlinkExternalIdResponse> UnlinkExternalId(string idProvider, string projectId, UnlinkExternalIdRequest unlinkExternalIdRequest, string authorization = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | idProvider | This is the id provider type. |
string | projectId | This is the Unity Project Id. It is a uuid format. |
Unlink |
unlinkExternalIdRequest | Unlink external Id request body |
string | authorization | This is the bearer token for the user authorized to call this API. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
UsernamePasswordUpdatePassword(string, UsernamePasswordPasswordUpdateRequest, string, CancellationToken)
Username Password Update Password
Declaration
ApiOperation<AuthenticationResponse> UsernamePasswordUpdatePassword(string projectId, UsernamePasswordPasswordUpdateRequest usernamePasswordPasswordUpdateRequest, string authorization = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | This is the Unity Project Id. It is a uuid format. |
Username |
usernamePasswordPasswordUpdateRequest | The Username, current Password and new Password of the player. |
string | authorization | This is the bearer token for the user authorized to call this API. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |