API authentication fails
Fix API v2 key, Clan ID, enabled-state, legacy-key, and header errors.
Last updatedSymptom
An API v2 request returns 401 or 403 with missing_credentials, invalid_api_key, key_disabled, api_disabled, legacy_key_unsupported, or a related authentication error.
Most likely causes
AuthorizationorX-Clan-Idis absent or malformed.- The secret belongs to a different community.
- The API master switch or individual key is disabled.
- The key was deleted, rotated, copied incompletely, or exposed with extra whitespace.
- A migrated legacy key is being used on
/v2. - The request is going to an old host or version.
Diagnostic checks
- Confirm the base URL is
https://v3.api.clanlabs.coand the path starts/v2. - Check
Authorization: Bearer YOUR_API_KEYwithout logging the real value. - Check
X-Clan-Id: COMMUNITY_IDagainst the API settings page. - Confirm both the community API switch and key are enabled.
- Compare the visible key prefix and name, not the secret.
- Determine whether the key is marked as migrated legacy material.
Resolution
Correct the two headers or use the key belonging to that Clan ID. Enable the key and master switch if authorised. Rotate a migrated legacy key to create a current cl_live_ secret for /v2, store it once, and update the server-side secret manager.
For Roblox server scripts, keep the key in the experience's secrets store and read it with HttpService:GetSecret(). Never put the key in a LocalScript, experience source code, log, screenshot, or support request.
When to retry
Retry one harmless read after correcting headers or state. Following rotation, the old key stops immediately, or within about a minute if cache invalidation was temporarily unreachable.
Contact support
Contact Clan Labs support if a newly rotated, enabled key and matching Clan ID fail against the documented API host.
Include this information
Include method and path, HTTP status, error code and message, Clan ID, key name and visible prefix, rotation time, and a redacted header shape. Never include the secret.