Does not support:dlightek, game_distribution, gamepush, gamesnacks, jio_games, lagged, poki, portal, reddit, xiaomi, youtube
Is the Player Currently Authorized
Use this to decide whether protected features are available right now, such as account-based saves, personalized content, or social actions.
bridge.player.isAuthorized
// Possible values: true, falseBridge.player.isAuthorized
Player ID
Returns the player's platform ID when available. Use it for display, analytics correlation, or backend verification, but do not rely on it until authorization is confirmed.
bridge.player.id
Bridge.player.id
PlaygamaBridge.PlayerId
PlaygamaBridge::PlayerId()
Bridge.player.id
playgama_bridge_player_id()
bridge.player.id()
bridge.player.id
If the platform supports authorization and the player is currently authorized, this returns their platform ID. Otherwise, it returns null.
Player Name
Returns the display name provided by the platform. Use it for profile UI, leaderboards, friend lists, or social prompts.
Returns null when no name is available; otherwise returns a string.
Player Avatar
Returns available player avatar URLs. Use the largest suitable image for profile UI, lobbies, or leaderboard rows.
Number of Player Avatars:
Get Avatar by Index:
Number of Player Avatars:
Get Avatar by Index:
Possible values: an array of avatar URLs sorted by increasing resolution, or an empty array.
Player Extra Fields
Returns platform-specific authorization data. Properties vary by platform.
Use this data on your backend to verify authorization. Playgama API verification currently supports only playgama, msn, and microsoft_store.
Player Authorization
Start the platform authorization flow. Call this from a direct player action, such as tapping a login button, before enabling account-only features.
func _ready():
var options = {}
Bridge.player.authorize(options, funcref(self, "_on_player_authorize_completed"))
func _on_player_authorize_completed(success):
if success:
print("Authorized")
else:
print("Authorization error")
func _ready():
var options = {}
Bridge.player.authorize(options, Callable(self, "_on_player_authorize_completed"))
func _on_player_authorize_completed(success):
if success:
print("Authorized")
else:
print("Authorization error")
var options = { }
playgama_bridge_player_authorize(json_stringify(options))
// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_player_authorize_callback" {
if async_load[? "success"] {
// your logic
}
}
local bridge = require("bridge.bridge")
function init(self)
local options = {}
bridge.player.authorize(
options,
function ()
-- success
end,
function ()
-- error
end)
end