On this page
Meeting Tokens API
A meeting token admits one person to one room. Read Meeting tokens for roles, permissions and claims.
Mint a meeting token for one person in one room#
POST /api/v1/rooms/{name}/tokens
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name required | path | string |
Send an Idempotency-Key header to repeat this call safely. The same key with the same body returns the first answer for 24 hours.
Body (JSON)
| Field | Type | Description |
|---|---|---|
user_id | string or integer | |
name | string | Up to 80 characters |
role | string | One of host, participant, viewer. Default "participant" |
perms | array of string | |
lang | string | |
ttl | integer | Seconds. Default 7200. Min 1, max 86400 |
Response
201 The token and a join link
| Field | Type | Description |
|---|---|---|
object | "meeting_token" | |
token | string | |
room | string | |
role | string | |
perms | array of string | |
user_id | string or null | |
name | string | |
expires_at | integer | |
url | string |
{
"object": "meeting_token",
"token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6Ii4uLiJ9...",
"room": "order-1042",
"role": "role",
"perms": [
"perms"
],
"user_id": "u-77",
"name": "order-1042",
"expires_at": 1793607000,
"url": "https://meet.respiresoft.com/r/order-1042"
}Errors
| Status | Meaning |
|---|---|
| 400 | invalid_parameter, unknown_parameter or invalid_json; param names the field |
| 401 | invalid_api_key or revoked_api_key |
| 404 | room_not_found, session_not_found or participant_not_found |
| 429 | rate_limited; wait Retry-After seconds |
Every error has the shape {"error": {"code", "message", "param"?}}. See Errors.
Examples
curl "https://meet.respiresoft.com/api/v1/rooms/order-1042/tokens" \
-H "Authorization: Bearer $MEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id":"u-77","name":"Ann","role":"host","ttl":3600}'import { Meet } from "@respiresoft/meet";
const meet = new Meet({ apiKey: process.env.MEET_API_KEY });
const { token, url } = await meet.rooms.createToken("order-1042", {
"user_id": "u-77",
"name": "Ann",
"role": "host",
"ttl": 3600
});
console.log(url);
Check a meeting token for one of your rooms#
POST /api/v1/meeting-tokens/verify
Send an Idempotency-Key header to repeat this call safely. The same key with the same body returns the first answer for 24 hours.
Body (JSON)
| Field | Type | Description |
|---|---|---|
token required | string | |
room | string | Also require the token to be for this room |
Response
200 The verdict
| Field | Type | Description |
|---|---|---|
object | "meeting_token_check" | |
valid | boolean | |
room | string | |
role | string | |
perms | array of string | |
user_id | string or null | |
name | string | |
lang | string or null | |
expires_at | integer |
{
"object": "meeting_token_check",
"valid": true,
"room": "order-1042",
"role": "role",
"perms": [
"perms"
],
"user_id": "u-77",
"name": "order-1042",
"lang": "en",
"expires_at": 1793607000
}Errors
| Status | Meaning |
|---|---|
| 400 | invalid_parameter, unknown_parameter or invalid_json; param names the field |
| 401 | invalid_api_key or revoked_api_key |
| 429 | rate_limited; wait Retry-After seconds |
Every error has the shape {"error": {"code", "message", "param"?}}. See Errors.
Examples
curl "https://meet.respiresoft.com/api/v1/meeting-tokens/verify" \
-H "Authorization: Bearer $MEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token":"<meeting token>","room":"order-1042"}'import { Meet } from "@respiresoft/meet";
const meet = new Meet({ apiKey: process.env.MEET_API_KEY });
const check = await meet.rooms.checkToken("<meeting token>", "order-1042");
console.log(check.valid, check.role);