Skip to main content

Player API

Talo provides a powerful and secure authentication system out of the box. You can use Talo to authenticate players using their email, username, or any other identifier you choose.

Players can have any number of arbitrary properties that will persist between game sessions and all of their identities. You can use these, for example, to store a player's current health or level.

Learn more about player management here.

Endpoints


Identify a player

GET https://api.trytalo.com/v1/players/identify

Headers

KeyRequiredDescription
x-talo-session NoThe session token (required if using Talo player authentication)

Query keys

KeyRequiredDescription
identifier YesThe unique identifier of the player. This can be their username, an email or a numeric ID
service YesThe name of the service where the identity of the player comes from (e.g. "steam", "epic" or "username")

Sample response

{ ... }

Steam authentication with identity (identifier format is <identity>:<ticket>)

{ ... }

Steam authentication without identity

{ ... }

Merge two players

POST https://api.trytalo.com/v1/players/merge

Body keys

KeyRequiredDescription
playerId1 YesThe first player ID - the second player will be merged into this player
playerId2 YesThe second player ID

Sample request

{ ... }

Sample response

{ ... }

Update a player's props

PATCH https://api.trytalo.com/v1/players/:id

Route params

KeyRequiredDescription
id YesThe ID of the player

Body keys

KeyRequiredDescription
props NoAn array of Props. Props that the player doesn't have will be added. Props with updated values will overwrite existing props. Props with a null value will be deleted from the player

Sample request

{ ... }

Sample response

{ ... }

Types

Prop

type Prop = {
key: string
value: string | null
}