Skip to main content

Game channel API

Channels are a way to send messages between players in your game. You can use channels to create chat rooms, send notifications or create any other kind of messaging system you can think of.

Learn more about channels here.

Endpoints


List game channels

GET https://api.trytalo.com/v1/game-channels

Query keys

KeyRequiredDescription
page YesThe current pagination index (starting at 0)

Sample response

{ ... }

List game channels that the player is subscribed to

GET https://api.trytalo.com/v1/game-channels/subscriptions

Headers

KeyRequiredDescription
x-talo-alias YesThe ID of the player's alias

Sample response

{ ... }

Create a game channel

POST https://api.trytalo.com/v1/game-channels

Headers

KeyRequiredDescription
x-talo-alias YesThe ID of the player's alias

Body keys

KeyRequiredDescription
autoCleanup NoWhether the channel should be automatically deleted when the owner leaves or the channel is empty (default is false)
name YesThe name of the channel
props NoAn array of Props

Sample request

{ ... }

Sample response

{ ... }

Join a game channel

POST https://api.trytalo.com/v1/game-channels/:id/join

Headers

KeyRequiredDescription
x-talo-alias YesThe ID of the player's alias

Route params

KeyRequiredDescription
id YesThe ID of the channel

Sample request

{ ... }

Sample response

{ ... }

Leave a game channel

POST https://api.trytalo.com/v1/game-channels/:id/leave

Headers

KeyRequiredDescription
x-talo-alias YesThe ID of the player's alias

Route params

KeyRequiredDescription
id YesThe ID of the channel

Update a game channel

PUT https://api.trytalo.com/v1/game-channels/:id

Headers

KeyRequiredDescription
x-talo-alias YesThe ID of the player's alias

Route params

KeyRequiredDescription
id YesThe ID of the channel

Body keys

KeyRequiredDescription
name NoThe new name of the channel
ownerAliasId NoThe ID of the new owner of the channel
props NoAn array of Props

Sample request

{ ... }

Sample response

{ ... }

Delete a game channel

DELETE https://api.trytalo.com/v1/game-channels/:id

Headers

KeyRequiredDescription
x-talo-alias YesThe ID of the player's alias

Route params

KeyRequiredDescription
id YesThe ID of the channel

Types

Prop

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