Retrieves a waitpoint token by its ID, including its current status and output if it has been completed.
Use your project-specific Secret API key. Will start with tr_dev_, tr_prod, tr_stg, etc.
You can find your Secret API key in the API Keys section of your Trigger.dev project dashboard.
Our TypeScript SDK will default to using the value of the TRIGGER_SECRET_KEY environment variable if it is set. If you are using the SDK in a different environment, you can set the key using the configure function.
import { configure } from "@trigger.dev/sdk";
configure({ accessToken: "tr_dev_1234" });
The ID of the waitpoint token.
Successful request
The unique ID of the waitpoint token.
"waitpoint_abc123"
An HTTP callback URL. A POST request to this URL (with an optional JSON body) will complete the waitpoint without needing an API key.
"https://api.trigger.dev/api/v1/waitpoints/tokens/waitpoint_abc123/callback/abc123hash"
The current status of the waitpoint token.
WAITING, COMPLETED, TIMED_OUT Tags attached to the waitpoint.
When the waitpoint token was created.
The idempotency key used when creating the token, if any.
When the idempotency key expires.
When the token will time out, if a timeout was set.
When the token was completed, if it has been completed.
The serialized output data passed when completing the token. Only present when status is COMPLETED.
The content type of the output (e.g. "application/json").
Whether the output represents an error (e.g. a timeout).