Stove SDK function based on native
access Token
through the PC SDK
s GetToken() (step 5 in the figure above).
PC SDK
has a new access Token
via the OnRenewToken() callback before the expiration of the validity period.StovePCToken
structure contains the token string (step 6 in the figure above).<aside> 💡 Cautions
To use an access Token
on the game server,
The game client must call the PC SDK's GetToken()' function to obtain the latest
access Token' and pass it to the game server for use.
Use the GetToken() function of the PC SDK
to get the token information of the logged-in user.
</aside>
StovePCResult result = StovePC_GetToken();
if (result == StovePCResult::STOVE_PC_NO_ERROR)
{
/*Success Process*/
}
If the GetToken() function processes successfully, the OnToken() callback is called.
The StovePCToken
structure passed to the callback contains the token string.
void OnToken(const StovePCToken token)
{
/*Token Information Output*/
printf("Token : %s", token.accessToken);
}
What's a token?
It's the key information issued through the launcher login.
Since the token information is managed inside the PC SDK, the developer will have no need to use this unless for special reasons
access token
to the game server. (Step 7 in the figure above)