Skip to main content
POST
Get a token that says who's playing a game

Authorizations

Authorization
string
header
required

An API key (pch_...) or the token from pch login.

Body

application/json
project
string
required
Pattern: ^[a-z0-9][a-z0-9_-]*\/[a-z0-9][a-z0-9-]*$
Example:

"mira/lantern-run"

release
string<uuid>

The release a test link plays (?release= on the play page): anyone signed in may play one that hasn't been turned down, whoever can see the game.

Response

A token for the game

token
string
required

A JWT signed with ES256 by a key at GET /v1/games/keys, for 15 minutes. iss is this environment's address (https://patch.gg in production), aud the game's project id, sub the player's id in this game; game, handle, name and picture are claims too.

expires_at
string
required
player
object
required
game
object
required