Authenticating with the Trigger.dev management API
secretKey
), or using a personal access token (personalAccessToken
). Both methods should only be used in a backend server, as they provide full access to the project.
runs.list
function can be called using either a secretKey
or a personalAccessToken
, but the projectRef
argument is required when using a personalAccessToken
:
View endpoint support
Endpoint | Secret key | Personal Access Token |
---|---|---|
task.trigger | ✅ | |
task.batchTrigger | ✅ | |
runs.list | ✅ | ✅ |
runs.retrieve | ✅ | |
runs.cancel | ✅ | |
runs.replay | ✅ | |
envvars.list | ✅ | ✅ |
envvars.retrieve | ✅ | ✅ |
envvars.upload | ✅ | ✅ |
envvars.create | ✅ | ✅ |
envvars.update | ✅ | ✅ |
envvars.del | ✅ | ✅ |
schedules.list | ✅ | |
schedules.create | ✅ | |
schedules.retrieve | ✅ | |
schedules.update | ✅ | |
schedules.activate | ✅ | |
schedules.deactivate | ✅ | |
schedules.del | ✅ |
tr_pat_
prefix. Because a PAT does not scope access to a specific environment, you must provide the projectRef
argument when using a PAT (and sometimes the environment as well).
For example, when uploading environment variables using a PAT, you must provide the projectRef
and environment
arguments: