Get the game authentication token for the current user
getGameAuthToken()

Getting the player's game authentication token

You can use the getGameAuthToken function to retrieve the game authentication token for the current user for use with the server-side authentication API. All guest users have the same authentication token, and do not need to be authenticated by your server.

NameTypeDescription
Return valueStringThe authentication token for the user.

📘

Note

You should not assume that the authentication token will remain the same for each user, as it will change any time a user changes their password.

var token = kongregate.services.getGameAuthToken();