Skip to main content

Get TokenID (GetTokenIDResult)

AndroidiOSWindows
If you're using Unreal Engine, see the GetTokenIDResult for Unreal Engine SDK.

Get the ID token from the result cache of QueryIDToken.

Function Definition

public static INTLIDTokenResult GetIDTokenResult();

Input Parameters

No input parameters.

Code sample

INTLIDTokenResult result = INTLAPI.GetIDTokenResult();

Return Value

Returns IDTokenResult, compiling the information obtained from the login status into a JWT-encoded string, which can be sent to the PlayFab game server for authentication.

IDTokenResult: Constructed using INTLAuthResult data.

Member VariableTypeDescription
IdTokenstringPlayer Network SDK unique OpenID, using JWT encoded string format

INTLAuthResult: Inherits from INTLBaseResult and contains login information

ParameterstypologyExplanation
OpenIDStringPlayer Network SDK user unique identification
Defaults to a 64-bit unsigned integer string, can also support 32-bit.
TokenstringPlayer Network SDK generated user token
Length: 40 bytes, see Token for detail.
TokenExpirelongToken expiration timestamp
For example: 1600844518.
FirstLoginintIs first login
Unknown: -1
No: 0
Yes: 1
UserNamestringNickname
GenderintGender
0: Undefined
1: Male
2: Female
BirthdatestringReturns empty due to compliance requirements prohibiting the collection of player birth dates.
PictureUrlstringAvatar URL
Pfstringpf value, used for Midas payment
Pfkeystringpf key, used for Midas payment
NeedRealNameAuthboolIs real name authentication required
ChannelIDintChannel number
ChannelStringChannel name
For more information, see Channel Definition
ChannelInfoStringThird-party channel login information (JSON data)
Value varies with each channel
BindListstringBinding information (JSON array type)