Getting a game's API key

How a game's crew creates, rotates and revokes the platform API key its Roblox servers send, and where to put it.

Get started

Each studio game has at most one platform API key in use. Its Roblox servers send it with every call to the developer API, for market reads and player feedback alike. The key is managed on the game's Developer tab in the panel.

Who can manage a game's key

Organization owners, and the game's crew: the developers named on its project and its lead. Everyone else sees the Developer tab with a note that the key is for the game's crew, and never sees the key, its fingerprint or its usage.

Create a key

  1. Open the Developer tab

    In the panel, open the game from Studio's Games page, then its Developer tab.

  2. Create the key

    Choose Create key. A game that already has a key in use cannot get a second one: rotate it instead.

  3. Copy it now

    The dialog Copy the key now shows the whole key once. Choose Copy key, or select it and copy it. The platform keeps only a hash of it.

  4. Store it as a Roblox secret

    Add it to the experience's secrets as BlockoutApiKey, with the domain studio.blockoutgames.com: in the Creator Dashboard for live servers, and in Studio's Local Secrets for testing. See Where a game's key is stored.

  5. Finish

    Choose Done. The dialog forgets the key. The tab now shows the key's fingerprint, who created it and when, and when a server last used it.

What the Developer tab shows about a key

Fingerprint

bk_live_… and the key's last four characters.

Created

Who created the key (or rotated it into being) and when.

Last usedto the minute

When a server last sent the key, or Never. It is written at most once a minute per key.

Usage

Requests in the last 24 hours and 7 days, refused or failed, rate limited, and a count per route. See A game's Developer tab.

What a game's key looks like

A key is bk_live_ followed by 43 letters, digits, - or _: 32 bytes (256 bits) from the server's secure random source, written as base64url. The prefix lets people and secret scanners recognise one. After it is created the panel shows only its fingerprint: bk_live_… and the last four characters.

What the platform stores of a key, and why a plain hash is enough

The platform stores the key's SHA-256 hash in hex, its last four characters, who created it and when, when it was last used and, once revoked, who revoked it and when. Never the key. A key holds 256 random bits, so its hash cannot be reversed or guessed and needs no salt (ADR-0050). A request is matched by one indexed lookup of the hash among keys that are not revoked and whose game is still in the studio's catalog.

Where a game's key is stored

The key lives only in the experience's Roblox secrets, as BlockoutApiKey with the domain studio.blockoutgames.com (not *), and Allow HTTP Requests must be on (File, Experience Settings, Security).

  1. Open the experience's secrets

    Creator Dashboard, the experience, Secrets, Create Secret.

  2. Add the secret

    Name BlockoutApiKey, the key as the value, domain studio.blockoutgames.com.

  3. Publish

    Turn on Allow HTTP Requests and publish the place.

A server reads it with HttpService:GetSecret("BlockoutApiKey"), which returns a Secret that cannot be printed. The rules are on Keeping a game's key secret.

How a game's key moves between states

A game has no key until someone on its crew creates one. Rotate replaces the key in use with a new one in one step; Revoke, or the game leaving the studio's catalog, ends it and leaves the game with no key.

A game key's lifecycle. A game starts with no key. Create key gives it a key in use. Rotate key replaces the key in use with a new one, revoking the old in the same step. Revoke key, or the game leaving the studio's catalog, revokes the key and leaves the game with no key, until someone creates a new one.

Rotate a key

Lost the key, or think someone else saw it? It cannot be shown again: rotate it to get a new one. A rotated key's usage counts start from zero.

  1. Rotate

    On the Developer tab choose Rotate key, then confirm Rotate the key?.

  2. Copy the new key

    A new key is made and shown once. The old one stops working at once, in the same step.

  3. Update the secret

    Put the new key in the experience's secret BlockoutApiKey straight away, in the Creator Dashboard and in any Studio local secrets.

  4. Let running servers cycle

    New servers read the new secret; servers already running keep the old key and are refused with 401 until they close.

Rotating a game's key. The crew chooses Rotate key. In one database transaction the API revokes the old key, stores the new key's hash and writes the audit entry, then shows the new key once. A server still running with the old key is refused with 401. The crew puts the new key in the BlockoutApiKey secret, and a server started after that sends the new key and is answered.

Revoke a key

  1. Revoke

    On the Developer tab choose Revoke key, then confirm Revoke the key?.

  2. Create a new one when needed

    The key stops working at once, and the game's servers can read and send nothing until someone creates a new key.

An owner can revoke a key even after its game left the studio.

What happens to the key when a game leaves the studio

A game removed from the studio's catalog takes its key with it: the key is refused while the game is unlisted, the catalog's save revokes it in the same transaction, and a game listed again starts with no key.

Where key changes are recorded

Every creation, rotation and revocation is in the audit log, under Games, as game-key-created, game-key-rotated or game-key-revoked. Each entry names the game, never the key or its fingerprint.

Checking a key from a server

GET /developer/v1/key answers the game the key belongs to and its limit per minute, so a server can check its secret when it starts. See GET /developer/v1/key.

Updated