---
title: "Get worker connection tokens"
method: POST
path: "/v1/workers/{id}/tokens"
tags: ["Workers"]
---

# Get worker connection tokens

`POST /v1/workers/{id}/tokens`

Returns connection tokens and the resolved OpenWork connect URL for an existing worker.

## Path parameters

- `id` string, typeid, required

## Response `200`

Worker connection tokens returned successfully.

- WorkerTokensResponse
  - `tokens` object, required
    - `owner` string, required
    - `host` string, required
    - `client` string, required
  - `connect` object, nullable, required
    - `openworkUrl` string, nullable, required
    - `workspaceId` string, nullable, required
  - `directPreview` object, nullable
    - `version` 1, required
    - `openworkUrl` string, required
    - `workspaceId` string, nullable, required
    - `expiresAt` string, date-time, required

## Other responses

- `400` — The worker token path parameters were invalid.
- `401` — The caller must be signed in to request worker tokens.
- `404` — The worker could not be found.
- `409` — The worker is not ready to return connection tokens yet.

## Changes

- **2026-08-27** `3f52e8fe4c1b` — 1 info
  - added the optional property `directPreview` to the response with the `200` status
- **2026-08-20** `93df40e2efd5` — 1 info
  - removed the pattern `^wrk_.*` from the `path` request parameter `id`

[Change history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/workers/:id/tokens/post.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) · [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openworklabs/den-api/revisions/571dc4a74532/schema)
