API keys

An API key is the only credential the API knows. It belongs to one server, and can do exactly what you ticked when you made it, nothing more.

Making a key

  1. In the dashboard, open your server, then Integration → API keys. You need the permission Create and revoke API keys.
  2. Press New key. A key works for any program, not only games.
  3. Give it a Name that says what uses it, like “Website” or “Our Discord bot”. It shows in the audit log next to everything the key does.
  4. Optionally give it a Category: pick one already in use or type a new one, like “Games” or “Bots”. The chips above the list then show one category at a time.
  5. Under What the key may do, tick only what your program needs. You can only give a key what you may do yourself.
  6. Copy the key. It starts with tfy_ and is shown only once. Lost it? Use Replace secret.

To rename a key or move it to another category later, press Edit next to it. That changes only how it is listed: the secret and what the key may do stay the same, so nothing using it has to change.

The API keys page in the dashboardThe API keys page in the dashboard

Sending it

Put it in the Authorization header of every request, after the word Bearer and a space:

Header
Authorization: Bearer tfy_abc123_your_secret_here

That is all. No username, no password, no token exchange. A key does not expire unless you give it an end date, and stops working the moment you revoke it.

Permissions: dashboard name and API name

The dashboard shows a permission by its name; the reference and error messages use its API name. They are the same thing:

API nameIn the dashboard
members.readSee members
verification.readSee linked accounts
verification.writeSend verification links and remove links
moderation.readSee punishments
moderation.writeIssue and lift punishments
moderation.lift_anyLift any punishment, even one a higher rank issued
moderation.staffAPI keys: act against staff, with the rank of the moderator in game
moderation.evidenceSee evidence
filters.readSee chat filters
filters.writeChange chat filters
tickets.readSee tickets
tickets.writeHandle tickets
forms.readSee applications and appeals
forms.writeDecide applications and edit forms
reports.readSee reports
reports.writeHandle reports
reports.submitSend reports from a game or tool
documents.readRead documents for staff
documents.writeWrite and manage documents
staff.readSee staff
staff.writeWrite notes and strikes
staff.manageManage staff roles, leave and quotas
servers.readSee live servers
servers.commandSend commands to a server
servers.broadcastSend to every server at once
bindings.readSee role rules
bindings.writeChange role rules
groups.readSee Roblox groups
groups.writeChange Roblox group ranks
settings.readSee settings
settings.writeChange settings
messages.writeWrite and post messages
audit.readSee the audit log
keys.readSee API keys
keys.writeCreate and revoke API keys

GET /guilds/YOUR_SERVER_ID/permissions answers which of these your key holds, which is handy to check a key before using it.

Keeping it safe

Careful

Anybody with the key can do what the key may do, on your server. Treat it like a password.
  • Keep it on a server, in an environment variable. Never in a website’s JavaScript, a mobile app, or a Roblox LocalScript: anybody could read it there.
  • Never post it in Discord or commit it to GitHub.
  • One key per program, so you can turn one off without breaking the others.
  • If a key may have leaked, revoke it under API keys at once and make a new one.

What a key can never do

Some things are always a person’s decision, so no key can hold them: managing staff roles, creating keys, managing an organization, and punishing across an organization. Endpoints for people, like sending an application or asking for leave, answer a key with 403 person_required.

A key has no staff rank. It can act on anybody the server could, but never on your staff team, unless it holds moderation.staff and names the moderator in actor; then it acts with that moderator’s rank.

How actions show up

Everything a key does is written in the audit log under the key’s name. When your program acts for a person, for example a moderator using your own panel, send an actor with their name and Discord or Roblox id; Technified credits them by name when their account is linked on your server.

Still stuck? Get help from the Technified team.