Get the user ID of the current user
getUserId()

Getting the player's Kongregate user id

You can use the getUserId function to retrieve the unique user ID of the current player. It will return 0 if the user is not signed in.

Please note that to securely authenticate a player, you should use the server-side authentication API.

NameTypeDescription
Return valueIntegerThe user ID of the current user.
var userId = kongregate.services.getUserId();