key_invalid

A Multiplayer API error, sent with HTTP 401. Status: the Multiplayer API is in private alpha; this code is part of its published contract.

When

The key is unknown or malformed.

What to do

Check the key in your environment (LOBBYLAB_PUBLISHABLE_KEY in the client, LOBBYLAB_SECRET_KEY on your backend).

The answer

Every error is a JSON body with a stable error code. Clients act on the codes they know and treat any other code as a failure of its HTTP status, and keep fields they do not know.

{
  "error": "key_invalid",
  "detail": "A sentence that is safe to show.",
  "next": "Check the key in your environment (LOBBYLAB_PUBLISHABLE_KEY in the client, LOBBYLAB_SECRET_KEY on your backend).",
  "docsUrl": "https://lobbylab.gg/docs/errors/key_invalid"
}

See also: every error code, the API reference and the docs.