API keys
An API key lets one of your tools call the Worktude API for your page. The page’s owner or an admin makes it on the dashboard’s API page, chooses what it can do, and copies it once: Worktude never shows it again.
On this page
- In the dashboard, open API in the menu. Only the page’s owner and admins see it.
- Under New Key, type a Name, such as the tool you’ll use it in, so that you know which key to revoke later.
- Under What it can do, keep what the tool needs: all four are chosen at first, and choosing one leaves it out.
- Choose Create Key.
- In Copy your key now, choose Copy Key, paste the key where your tool keeps its secrets, and choose Done.
The same dialog shows a first request to try, under Try it:, which answers your workspace.
Warning
A key acts for the person who made it, so keep it as secret as a password: on your server, never in a web page or an app. Worktude keeps only the key’s SHA-256 hash, so nobody can show it to you again. If you lose it, revoke it and make another.
Each key has one or more scopes, which the dashboard lists under What it can do, by the names in bold:
| Scope | What it opens |
|---|---|
messages:read | Read messages: GET /messages and GET /messages/{id}. |
bookings:read | Read bookings: GET /bookings and GET /bookings/{id}. |
links:read | Read short links: GET /links and GET /links/{id}. |
links:write | Make and change short links: POST /links, PATCH /links/{id} and DELETE /links/{id}. |
GET /workspace answers any key. links:write doesn’t include links:read, so a tool that lists links and changes them needs both. A route the key has no scope for answers 403 missing_scope.
A key starts with wtk_, followed by 32 characters of base64url: 192 random bits. Under Keys, the API page lists each working key with its name, its first 8 characters, what it can do, who made it and when, and when it was last used. Worktude notes a key’s last use at most once an hour.
A key acts for the person who made it: Worktude records each change the key makes in their name, together with the key. It opens only the page it was made for, and never the dashboard’s own routes. It stops working when someone revokes it, when the person who made it leaves the page’s team or is removed from it, and when they delete their account.
- Open API, find the key under Keys, and choose Revoke.
- Choose Revoke again to confirm.
The tools that use the key stop working at once: its next request answers 401 invalid_api_key. Revoking a key also frees its place, since a page keeps 25 working keys at most.
Plans
Making a key needs a plan that includes the API. On another plan, every request answers 403 plan_limit, and the keys stay listed so that you can revoke them. They work again once the plan includes the API.
- Can an editor make a key?
No. Only the page’s owner and admins see API in the menu and manage the page’s keys.
- What happens to my keys when I leave a page’s team?
The keys you made for that page stop working. The keys that other people made keep working.
- Why can’t I make another key?
A page keeps 25 working keys at most, and the API page says so when you try to make another. Revoke one you no longer use first.