API keys
Purpose
API keys let your game’s server prove its identity to Open Play. This page lists the keys of the selected game and environment, and lets you create new keys and manage their expiry and status. It is the API anahtarları (API keys) tab inside Oyun ayarları (Game settings).
When to use
- When you connect your game server to Open Play for the first time.
- To revoke a key that has leaked or is no longer needed.
- To extend a key’s expiry or rename it.
Step by step
Creating a new key
- Use the environment selector at the top to choose the game and environment the key will work in.
- Press Anahtar oluştur (Create key). Only admins with key write permission see this button.
- Give the key a name and choose the Anahtar türü (Key type): Sunucu anahtarı (Server key) for your game server, İstemci anahtarı (Client key) for the game client.
- Pick a period under Geçerlilik (Validity). If you are unsure, a period such as 90 days that you renew regularly is safer.
- Write a short reason in the Not (Note) field.
- Press Anahtarı oluştur (Create the key).
- Copy the secret value shown on the page right away and store it somewhere safe.
Warning
The secret value is shown only once, when the key is created; it cannot be viewed afterwards. If you lose it, you must rotate the key.
Using the key
Your game server sends the key in the Authorization header with every request:
curl https://<your-server>/v1/<endpoint> \
-H "Authorization: Bearer crx_live_<prefix>_<secret>"
Replace the placeholders with your own values. Do not write the real key into source code or the game client.
Editing, rotating and revoking a key
- Click the key’s row in the list to open its detail page.
- Use Düzenle (Edit) to change the name, expiry and notes; the secret value does not change.
- Rotate revokes the old secret and shows the new value once.
- Devre dışı bırak (Disable) pauses the key temporarily, Etkinleştir (Enable) turns it back on; Revoke is permanent.
Fields and options
| Field | Required | Description |
|---|---|---|
| Anahtar adı (Key name) | Yes | A name to recognise the key in the list; at least 2 characters |
| Anahtar türü (Key type) | Yes | Server (secret) or client (can be embedded in the game) |
| Geçerlilik (Validity) | Yes | No expiry, 30 days, 90 days, 1 year or a custom date; when editing there is also “Değiştirme” (Do not change) |
| Not (Note) | Yes | The reason written to the audit log, 8-500 characters |
| Anahtarın sahibi (Key owner) | No | Default is “Bu ortam” (This environment); it is under “Gelişmiş ayarlar” (Advanced settings) |
| Sahip oyuncu / organizasyon (Owner player / organization) | Depends on the owner type | Required once you pick an owner |
| Kapsam etiketleri (Scope labels) | No | Labels for notes only |
| İzinler (Permissions) | No | Name-value notes; they do not restrict access |
| Ek bilgiler (Extra information) | No | Name-value notes; they do not restrict access |
Note
Scope labels, permissions and extra information are for your records only for now. What a key can access is decided by the key type (server or client).
Common situations
| Situation | What to do |
|---|---|
| I lost the secret value | Rotate the key with Rotate; save the new value and update it on your server. |
| A key stopped working one day | It may have expired, been disabled or been revoked; check its status and end date on the detail page. |
| The “Anahtar oluştur” button is missing | Your role has no key write permission; ask an admin. |
| A server key was embedded in the client | Revoke the key immediately, create a new one and use it only on the server. |