Skip to main content
Getting Started

Not translated yet — showing English.

API Key Management

An API key identifies your project and environment to PlayServ. The game client, your servers, the CLI and CI all authenticate with one. Keys live on the Projects page: select a project card, and its keys appear in the API keys panel below the cards, for the environment chosen in the top bar.


Key types

TypePrefixUse it inCan
Serversk_Your backend, game servers, CI and the CLIEverything the project's runtime allows, including signing in to the CLI. Keep it secret.
Clientpk_The game build you ship to playersWhat a game client needs: sign players in, read data within each table's access rules, call functions and receive events. Safe to ship.

Never ship a server key in a game build

Anyone who extracts a server key from your build gets full access to the project's runtime. Players get client keys only.

Each key belongs to one environment. A dev key doesn't work in prod, and the panel shows only the keys of the environment selected in the top bar.

To see or create keys for another environment, switch the environment in the top bar first. Giving each consumer its own key — one per developer, one for CI, one per server — means revoking one never takes the others down.


Create a key

Open Create key

On Projects, select the project and click Create key in the API keys panel.

Name it and choose the type

Enter a Name that tells you where the key is used, for example prod-server-ci, pick Server or Client, and click Create key.

The dialog shows the Environment the key will belong to: the one selected in the top bar. It can't be changed here; for a key in another environment, close the dialog and switch the environment first.

Save the secret

The full secret appears in Save your token. A secret looks like sk_dev_ or pk_dev_ followed by 32 characters.

Save the secret before you close the dialog

The secret is shown only once. Copy it to a password manager or your CI secrets before you click I've saved it, close: PlayServ can't show it again. If you lose it, rotate the key to get a new one.


The keys list

ColumnWhat it shows
NameHover it to see who created the key and when. Click it to rename.
Type · EnvServer or client, and the environment.
PrefixThe start and end of the secret, masked.
Key IDThe key's permanent id, with a copy button. It stays the same when you rotate the secret.
StatusWhen the key was last used, or never. Amber when a key hasn't been used for 30 days.

Filter by Server or Client, and sort by Last used, Created or Name. The strip above the list counts active keys and the ones unused for 30 days; click that count to sort the stale keys to the top.


Rotate a secret

Rotate secret in a key's menu replaces its secret and shows the new one once, in Save your new token. The key keeps its name, type and id.

The old secret stops working immediately

Rotation is a hard cutover: anything still using the old secret is refused from that moment. Update your servers and CI first, or be ready to update them right away. Connections that are already open stay open.

Rotate a server key when it may have leaked, or on a schedule.

Rotating a client key cuts off builds already shipped

The game uses its client key every time it renews a player's session, about every 15 minutes. After a rotation, every build with the old key loses its session and can't sign players in until they install a build with the new key. A build with a new key also doesn't find the anonymous player saved on the device, and starts a new one. Rotate a client key only when it has leaked.


Revoke a key

Revoke in a key's menu stops the key from authenticating, and closes every live connection that uses it, right away.

WhenWhat happens
UndoFor 60 seconds the row shows Undo with a countdown, and so does the notification. Undoing restores the key, but connections that were closed stay closed.
After 60 secondsThe key moves to the collapsed Revoked group, where you can see when and by whom it was revoked. It can't be brought back.

A key being revoked can't be rotated until you undo the revoke. Revoke a key when a whole consumer should lose access; rotate it when only the secret is compromised.


Next steps

Last updated on 15 Oct 2026