API keys
Create an API key, limit what it can do, and revoke it when you no longer need it.
An API key identifies your account to the Platform API. You create and manage keys on the API keys page in your account settings.
Create a key#
Name it
Use a name that says where the key runs, such as "Production server". The name appears in the key list and in every confirmation, so it's how you tell keys apart later.
Choose the workspace
A key can reach all your workspaces or be tied to one. A key tied to one workspace only ever sees that workspace.
Choose when it expires
30 days, 90 days, one year, or never. The default is 90 days.
Choose its permissions
A new key starts with read-only access:
apps:readanddata:read. Add only what the key needs. See Permissions.Copy the key
The full key is shown once, right after you create it. YeshBe doesn't keep it, so it can't be shown again. If you lose it, create a new key.
Use the key#
Send the key as a bearer token on every request.
Authorization: Bearer yb_live_a3f2c9d1e8b4f7a2c5d9e1b3f6a8c2d4Not sure what a key can do? Call GET /me. It returns the account and the exact scopes attached to the key you're holding, which is usually faster than guessing at a 403.
Find a key in the list#
The list shows each key's name, the start and the last four characters of the key, how many permissions it has, when it was created, when it was last used, and its status.
| Status | Meaning |
|---|---|
| Active | The key works. |
| Expired | The key passed its expiry date and no longer works. |
| Revoked | You stopped the key. It no longer works. |
Change a key#
You can rename a key and change its permissions at any time. You can't change the key itself. To replace it, create a new key and revoke the old one.
See what a key did#
Every key has an activity log. Each entry shows the time, the method, the endpoint, the status code and how long the request took.
Revoke or delete a key#
Revoking stops a key from working. A revoked key stays in the list, dimmed, so its activity log stays attached to it.
Deleting removes a revoked key from the list. Its activity log is kept.