TFCL PLAY · API KEYS
Service-to-service bearer authentication for TFCL Premium members. Issue a key on
/premium, paste the
Authorization header into your service, and you can drive provisioning,
scheduling, and map uploads from any language that can make an HTTP request.
Authorization: Bearer tfcl_pk_<43 chars>
https://play.tfcleague.com
Retry-After on overrun.
All routes below also accept a session cookie. The bearer header lets you call them from your own service / bot / dashboard without scraping the Steam login flow.
Provision a premium server in Frankfurt, CP Process, with the RGL config preset - one POST, no scraping.
curl -X POST "https://play.tfcleague.com/api/servers" -H "Authorization: Bearer tfcl_pk_YOUR_KEY_HERE" -H "Content-Type: application/json" -d '{
"region": "fra",
"map": "cp_process_f12",
"config_preset": "rgl",
"rcon_password": "your-strong-password"
}'
The response is the same shape any logged-in browser session gets - a row of the reservation table including connect IP and RCON once Vultr has provisioned.
- Create on /premium → raw key shown once (save it then).
- Storage is SHA-256 only - TFCL cannot recover a lost raw key.
- Auto-stop when TFCL Premium lapses - no manual cleanup needed.
- Revoke manually any time on /premium or via
DELETE /api/premium/api-keys/:id.
- Bearer key in
Authorizationheader - never in URLs (they end up in logs). - Key format:
tfcl_pk_<43 base64url chars>- 256 bits of CSPRNG entropy. - Constant-time-ish SHA-256 lookup on the auth path - no timing oracle.
- Per-key audit log (endpoint, method, hashed IP, status) - visible to the owner in the /premium card. Admins see all keys.
- Prefix
tfcl_pk_= premium-scope (auto-stops on lapse). Prefixtfcl_ak_= admin-scope (requiresis_admin = 1).
/api/premium/api-keys
{"label":"Stats dashboard"} (optional nickname). Response includes raw_key shown exactly once./api/premium/api-keys
/api/premium/api-keys/:id
DELETE /api/admin/api-keys/:id.- 200Authenticated request succeeded.
- 201Provisioning or upload completed.
- 401No valid bearer key (and no session cookie, for endpoints that also accept cookies).
- 403Bearer key valid but bound account has lapsed TFCL Premium, isn't admin for an admin-scoped key, or the route's RBAC rule failed.
- 429Rate limit exceeded - check
Retry-Afterheader for cooldown.