From 843a635e666ab12dc2b7e6edf5411087e7506810 Mon Sep 17 00:00:00 2001 From: Ryan Gaus Date: Mon, 1 Dec 2025 12:01:09 -0500 Subject: [PATCH 1/2] fix: update docs to refer to new token endpoint --- TEMPLATE.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/TEMPLATE.md b/TEMPLATE.md index d87da16..52fafc0 100644 --- a/TEMPLATE.md +++ b/TEMPLATE.md @@ -8,14 +8,18 @@ This template implements a minimal token server using Node.js, TypeScript, Expre When running this token server as a sandbox app, LiveKit hosts a public endpoint you can use to generate tokens. To generate a token, simply make a `POST` request to `https://cloud-api.livekit.io/api/sandbox/connection-details` with the following request format: -| **Request format** | | | -| ------------------ | ---------------------------- | ------------------------------ | -| Method | `POST` | | -| URL | `https://cloud-api.livekit.io/api/sandbox/connection-details` | -| Optional Parameters| `roomName` | (your room name) | -| | `participantName` | (your participant name) | -| Headers | `X-Sandbox-ID` | (your Sandbox ID) | -| | `Content-Type` | `application/json` | +| **Request format** | | | +| ------------------ | ---------------------------- | --------------------------------- | +| Method | `POST` | | +| URL | `https://cloud-api.livekit.io/api/v2/sandbox/connection-details` | +| Headers | `X-Sandbox-ID` | (your Sandbox ID) | +| | `Content-Type` | `application/json` | +| Optional Body | `room_name` | (optional room name) | +| | `participant_identity` | (optional participant identity) | +| | `participant_name` | (optional participant name) | +| | `participant_metadata` | (optional participant metadata) | +| | `participant_attributes` | (optional participant attributes) | +| | `room_config` | (optional room config) | Generated tokens will have a default TTL of 15 minutes. Optional parameters not included in the request will be generated by the token server. From 90e004612e40e52f99968f307427093db55ddc4c Mon Sep 17 00:00:00 2001 From: Ryan Gaus Date: Mon, 1 Dec 2025 12:04:54 -0500 Subject: [PATCH 2/2] fix: add endpoint response format as well --- TEMPLATE.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TEMPLATE.md b/TEMPLATE.md index 52fafc0..a6e488c 100644 --- a/TEMPLATE.md +++ b/TEMPLATE.md @@ -21,6 +21,12 @@ When running this token server as a sandbox app, LiveKit hosts a public endpoint | | `participant_attributes` | (optional participant attributes) | | | `room_config` | (optional room config) | +| **Response format** | | | +| ------------------- | ---------------------------- | -------------------------------- | +| Response Body | `server_url` | Room connection url | +| | `participant_token` | Room connection token | + + Generated tokens will have a default TTL of 15 minutes. Optional parameters not included in the request will be generated by the token server. ## Installation