Skip to content

Commit 4c8c4c4

Browse files
authored
Update docs to refer to new token endpoint (#64)
* fix: update docs to refer to new token endpoint * fix: add endpoint response format as well
1 parent d6137fb commit 4c8c4c4

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

TEMPLATE.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,24 @@ This template implements a minimal token server using Node.js, TypeScript, Expre
88

99
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:
1010

11-
| **Request format** | | |
12-
| ------------------ | ---------------------------- | ------------------------------ |
13-
| Method | `POST` | |
14-
| URL | `https://cloud-api.livekit.io/api/sandbox/connection-details` |
15-
| Optional Parameters| `roomName` | (your room name) |
16-
| | `participantName` | (your participant name) |
17-
| Headers | `X-Sandbox-ID` | (your Sandbox ID) |
18-
| | `Content-Type` | `application/json` |
11+
| **Request format** | | |
12+
| ------------------ | ---------------------------- | --------------------------------- |
13+
| Method | `POST` | |
14+
| URL | `https://cloud-api.livekit.io/api/v2/sandbox/connection-details` |
15+
| Headers | `X-Sandbox-ID` | (your Sandbox ID) |
16+
| | `Content-Type` | `application/json` |
17+
| Optional Body | `room_name` | (optional room name) |
18+
| | `participant_identity` | (optional participant identity) |
19+
| | `participant_name` | (optional participant name) |
20+
| | `participant_metadata` | (optional participant metadata) |
21+
| | `participant_attributes` | (optional participant attributes) |
22+
| | `room_config` | (optional room config) |
23+
24+
| **Response format** | | |
25+
| ------------------- | ---------------------------- | -------------------------------- |
26+
| Response Body | `server_url` | Room connection url |
27+
| | `participant_token` | Room connection token |
28+
1929

2030
Generated tokens will have a default TTL of 15 minutes. Optional parameters not included in the request will be generated by the token server.
2131

0 commit comments

Comments
 (0)