PlayerAuthenticationApi
Import
Import
Constructors
Constructor
-
Parameters
-
Optional configuration: Configuration
-
basePath: string = ...
-
axios: AxiosInstance = ...
Returns PlayerAuthenticationApi
-
Methods
Code Confirmation
-
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
Optional unityEnvironment: string
-
Optional authorization: string
-
Optional codeLinkConfirmationRequest: CodeLinkConfirmationRequest
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<void, any>>
-
Delete Player
-
Delete the player.
Parameters
-
playerId: string
This is the player id.
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
Optional authorization: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<void, any>>
-
Generate Code
-
Generates a sign in code for an unauthenticated device.
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
Optional unityEnvironment: string
-
Optional generateCodeRequest: GenerateCodeRequest
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<GenerateCodeResponse, any>>
-
Get Code Info
-
Get code information including the identifier and expiration.
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
codeLinkInfoRequest: CodeLinkInfoRequest
Code Link Request for Sign In
-
Optional unityEnvironment: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<CodeLinkInfoResponse, any>>
-
Get J S O N Web Key Set
-
Get the JSON Web Key Set for validating authentication tokens.
Parameters
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<JSONWebKeySet, any>>
-
Get Player
-
Get the information for a player.
Parameters
-
playerId: string
This is the player id.
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
Optional authorization: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<PlayerResponse, any>>
-
Link External Id
-
Link an External Id to a Unity Authentication account
Parameters
-
idProvider: string
This is the id provider type.
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
linkExternalIdRequest: LinkExternalIdRequest
Link External Id request body
-
Optional authorization: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<LinkExternalIdResponse, any>>
-
Read Notifications
-
Gets a player's notifications to be displayed by the client.
Parameters
-
playerId: string
This is the player id.
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
Optional authorization: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<ReadNotificationsResponse, any>>
-
Sign In With Code
-
Tries to sign in a user with code. In the case this returns 200 and an empty response, poll at regular intervals, 2-5s to avoid being rate limited, until you receive a different response.
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
codeLinkSessionId: string
An identifier for the device requesting the code sign in.
-
signInWithCodeRequest: SignInWithCodeRequest
Code Link Request for Sign In
-
Optional unityEnvironment: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<AuthenticationResponse, any>>
-
Sign In With Custom I D
-
Sign In using a Custom ID
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
customIDRequest: CustomIDRequest
Custom ID Request for Sign In
-
Optional unityEnvironment: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<AuthenticationResponse, any>>
-
Sign In With External Token
-
Authenticate players using external token. The external tokens are from login providers, such as Facebook.
Parameters
-
idProvider: string
This is the id provider type.
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
signInWithExternalTokenRequest: SignInWithExternalTokenRequest
External Token Authentication request body
-
Optional unityEnvironment: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<AuthenticationResponse, any>>
-
Sign In With Session Token
-
Authenticate players using the session token. Store the session token in a persistent storage in the app or on device.
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
signInWithSessionTokenRequest: SignInWithSessionTokenRequest
Session Token Authentication request body
-
Optional unityEnvironment: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<AuthenticationResponse, any>>
-
Sign In With Username Password
-
Sign in using the Username Password IdProvider. Store the session token in a persistent storage in the app or on device.
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
usernamePasswordRequest: UsernamePasswordRequest
The Username and Password of the player.
-
Optional unityEnvironment: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<AuthenticationResponse, any>>
-
Sign Up Anonymously
-
Sign-up a new anonymous player.
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
Optional unityEnvironment: string
-
Optional signUpAnonymouslyRequest: SignUpAnonymouslyRequest
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<AuthenticationResponse, any>>
-
Sign Up With Username Password
-
Create a new player for the Username Password IdProvider. Store the session token in a persistent storage in the app or on device.
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
usernamePasswordRequest: UsernamePasswordRequest
The Username and Password of the player.
-
Optional unityEnvironment: string
-
Optional authorization: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<AuthenticationResponse, any>>
-
Unlink External Id
-
Unlink an external account from a Unity Authentication account.
Parameters
-
idProvider: string
This is the id provider type.
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
unlinkExternalIdRequest: UnlinkExternalIdRequest
Unlink external Id request body
-
Optional authorization: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<UnlinkExternalIdResponse, any>>
-
Username Password Update Password
-
Update the password of a player using the Username Password IdProvider. Store the session token in a persistent storage in the app or on device.
Parameters
-
projectId: string
This is the Unity Project Id. It is a uuid format.
-
usernamePasswordPasswordUpdateRequest: UsernamePasswordPasswordUpdateRequest
The Username, current Password and new Password of the player.
-
Optional authorization: string
-
Optional options: RawAxiosRequestConfig<any>
Returns Promise<AxiosResponse<AuthenticationResponse, any>>
-
Allow a user to sign in to this account using this code
Code Confirmation
{RequiredError}
PlayerAuthenticationApi