Skip to content

Commit 085277b

Browse files
jackbridgerTrigger.dev RepoOps
authored andcommitted
docs: say which API key completes waitpoint tokens from a backend
Mono-RevId: 51b365fc61e75e67666241f6739860c7a29b7b5b
1 parent 0f903e7 commit 085277b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎docs/wait-for-token.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ await wait.completeToken<ApprovalToken>(tokenId, {
5757
});
5858
```
5959

60+
Outside a task, the SDK authenticates with the secret key in `TRIGGER_SECRET_KEY` by default. A key with [custom access](/apikeys/custom-access) needs **Waitpoints: Read & write** to create and complete tokens. The **Waitpoints only** [preset](/apikeys#access-presets) is the narrowest key that works.
61+
6062
## Completing from the browser
6163

6264
The `publicAccessToken` returned by `wait.createToken()` is scoped to that specific waitpoint and intended for client-side completion. The completion endpoint has CORS enabled, so you can call it directly from client-side code without proxying through your backend.

0 commit comments

Comments
 (0)