# Secrets

Every secret Qualithm issues starts with `qm_`, then a three-letter code for its kind and another
underscore. A claim code or webhook trigger secret then names its zone, such as `sgsina_`. The rest
is lowercase hex. The last eight characters are a checksum, so Qualithm refuses a secret that was
mistyped or cut short before it checks anything else.

| Starts with | What it is                                                    |
| ----------- | ------------------------------------------------------------- |
| `qm_tok_`   | An [API token](https://docs.qualithm.com/teams.md#create-an-api-token)                    |
| `qm_clm_`   | A [claim code](https://docs.qualithm.com/http.md#claim-a-device)                          |
| `qm_dsk_`   | A [device token](https://docs.qualithm.com/devices.md#connect-it-with-a-credential)       |
| `qm_whk_`   | An [automation's webhook trigger secret](https://docs.qualithm.com/automations.md)        |
| `qm_ses_`   | A browser [session](https://docs.qualithm.com/sessions.md), kept in a cookie              |
| `qm_ivt_`   | The link in a team invite email                               |
| `qm_rst_`   | The link that restores a deleted account                      |
| `qm_oac_`   | An authorization code the CLI or MCP server trades for tokens |
| `qm_oaa_`   | An access token the CLI or MCP server signs in with           |
| `qm_oar_`   | A refresh token the CLI or MCP server renews its access with  |

## Find a leaked secret

Search code, logs and chat exports for this pattern. It matches every kind above:

```text
qm_[a-z]{3}_
```

## Revoke a leaked secret

Revoke it where it was created. Each of these stops it working at once and cannot be undone:

- An API token: **Revoke** it under **API tokens** in the team's settings.
- A device token: **Rotate** or **Revoke** it on the device's **Credentials** tab.
- A session: [sign that browser out](https://docs.qualithm.com/sessions.md#sign-a-browser-out).

Then check [Activity](https://docs.qualithm.com/activity.md) for anything the secret did.

## See also

- [Teams](https://docs.qualithm.com/teams.md)
- [Devices](https://docs.qualithm.com/devices.md)
- [Sessions](https://docs.qualithm.com/sessions.md)
