API tokens
An API token lets a program act for your workspace without a person signing in. A CI job uses one to start a run, to read its result, to stop it and, when the app under test runs inside the job, to carry out the run (see An app started in the job). Tokens are created and revoked under API tokens in Settings, on its API tokens & MCP part.
The section says A token lets a CI job start runs and read their results without anyone signing in. It acts for this workspace, or for one project, with the same limits and budget as Start run. It is shown once, when it is created; only a part of its start is kept to recognise it.
Creating one
Section titled “Creating one”Owners and admins create tokens. A member sees the section and Only an owner or admin of this workspace can create or revoke API tokens., and not the tokens.
- Under Name, such as the CI it is for, type what the token is for, such as GitHub Actions. A name is 1 to 100 characters.
- Under Acts for, choose The whole workspace, or Only and one of the workspace’s projects.
- Choose Create token; the button reads Creating… while it works.
The page then shows GitHub Actions was created. Copy the token now: it is not shown again. with the token in a box, selected, and two buttons: Copy, which answers Copied. — or, when your browser refuses, Your browser refused to copy; the token is selected, copy it with the keyboard. — and I have copied it, which closes the box. Once it is closed there is no way to see the token again; revoke it and create another.
A token starts with trw_ and is 47 characters long.
What a token can do
Section titled “What a token can do”| Scope | What it can do |
|---|---|
| The whole workspace | Start a run of any project of the workspace, read the result of any run of the workspace and stop any of them. Carry out the own-runner runs of any project. |
| Only one project | The same for that project alone. Starting a run for another project is refused with This API token is limited to another project.; reading or stopping another project’s run answers Run not found. |
A token starts runs, reads their results and stops them through the Run API, and carries out own-runner runs, and nothing else. It cannot read or change a plan or a project, or change anything in Settings.
A runner that trawler-ci starts takes the jobs of the one run it was started for, with either scope. A runner started by hand with a token and no TRAWLER_RUN_ID takes the jobs of any own-runner run without --url within the token’s scope, so a token for the whole workspace lets it carry out any project’s run. A token for one project is the safer choice for a job: if it leaks, it reaches that project alone.
A run started with a token is an ordinary run under the same rules as Start run: the workspace’s plan limits, its monthly budget, a project that is paused, one run at a time on a project — except runs on an own runner with an address of their own, of which a workspace may have 5 — and the workspace’s model key. It differs in one way: it asks nothing at the Start panel, so no checkbox confirms that you may test the product. A token therefore cannot start a project’s first run: that is refused until a run has been started from the app. Like Start run, it tests the workspace’s model key before the run is queued. See The Run API.
The list
Section titled “The list”Each token is listed, newest first, with its name; its first characters, such as trw_Ab3d…; whole workspace or only and the project’s name; created and when, in your browser’s time zone; and last used and when, or never used. A token’s use is recorded at most once a minute. Until the first one is created the list says No API tokens yet.
Using a token includes carrying out a run with it: a CI job’s runner records its use each time it asks Trawler for work.
Revoking one
Section titled “Revoking one”Revoke next to a token asks first, Revoke GitHub Actions? Jobs that use it stop working., with Revoke, which reads Revoking… while it works, and Keep it. A revoked token leaves the list and is refused at once — That API token is not valid or was revoked. — by every call after that. A job that was already handed to a runner goes on until it ends; the runner gets no more.
Limits
Section titled “Limits”| Limit | |
|---|---|
| Tokens at a time | 20 in a workspace that have not been revoked |
| Run API calls | 120 a clock minute for each token, counted in Trawler’s database so that the limit holds across servers; over it, a call is refused with 429 and a Retry-After header |
| A name | 1 to 100 characters |
Messages
Section titled “Messages”| Message | Why |
|---|---|
| Only an owner or admin of this workspace can create or revoke API tokens. | Your role does not allow it — for example, it changed while the page was open. |
| Give the token a name of up to 100 characters. | The name is empty, or longer than 100 characters. |
| A workspace can hold at most 20 API tokens. Revoke one first. | The workspace has 20 tokens that have not been revoked. |
| That project is not in this workspace. | The project chosen under Acts for is not in the workspace. |
| The token could not be created. Try again. | Something else went wrong, and no token was made. |
| That token is already gone. | Someone revoked it in the meantime. |
| Trawler has been updated since this page opened. Reload the page to create the token. — or …to revoke the token. | Trawler was updated while the page was open. Nothing was created or revoked. |