Skip to content

API Key Management

API keys authenticate your game’s requests to Quest Data. Manage keys per game and rotate them regularly to maintain security.

TypeTierCountRotationUse
Game KeyAll1ManualPrimary key in shipped game
Dev KeyFree1ManualLocal development
Env KeysPro+3Autodev/staging/prod separation
  1. Go to Configuration > API Keys
  2. Or from game detail: Game > Settings > API Keys

Each key shows:

  • Key Value: qd_sk_a1b2c3d4e5... (masked after creation)
  • Environment: Production, Staging, Dev (if applicable)
  • Created: Date key was generated
  • Last Used: Most recent request timestamp
  • Status: Active or Revoked

Never hardcode keys permanently. Rotate regularly:

  1. Click Generate New Key to create a replacement
  2. Update your game/server to use new key
  3. After 24 hours, click Revoke on old key
  4. Revoked keys stop accepting requests

Timing matters:

  • Generate new key
  • Deploy update with new key
  • Wait for 90% of players to update (typical: 2-4 weeks)
  • Then revoke old key
PracticeWhy
Rotate AnnuallyLimit exposure window if compromised
Dev ≠ ProdDev key can be public; prod key is secret
Monitor ActivityCheck “Last Used” timestamp for anomalies
Don’t Commit KeysUse environment variables, not hardcoded
# Don't do this:
const API_KEY = "qd_sk_a1b2c3d4e5" # BAD!
# Do this instead:
func _ready():
var api_key = ProjectSettings.get_setting("quest_data/api_key")
QuestData.set_api_key(api_key)

In Project > Project Settings > Quest Data:

api_key: qd_sk_a1b2c3d4e5
api_url: https://api.questdata.io
FeatureFreePro
Game Keys1Unlimited per game
Env KeysNo3 per game (dev/staging/prod)
Key RotationManualAuto-rotate every 90 days
Access LogsLast 7 daysLast 90 days
Rate Limit100 req/min10,000 req/min
Terminal window
# List keys for a game
curl "https://api.questdata.io/v1/games/my-game-id/keys" \
-H "Authorization: Bearer YOUR_JWT"
# Create new key
curl -X POST "https://api.questdata.io/v1/games/my-game-id/keys" \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{"environment": "production"}'
# Revoke key
curl -X DELETE "https://api.questdata.io/v1/games/my-game-id/keys/qd_sk_xyz" \
-H "Authorization: Bearer YOUR_JWT"

Response (Create Key):

{
"id": "qd_sk_a1b2c3d4e5f6g7h8i9j0",
"environment": "production",
"created_at": "2026-04-06T10:30:00Z",
"last_used": null
}