Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,24 @@ 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) |

| **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.

Expand Down
Loading