### Example Ngrok Tunnel Command
Source: https://docs.recall.ai/docs/local-webhook-development
An example of starting an ngrok tunnel with a specific static domain and local port.
```bash
ngrok http --domain my-static-domain.ngrok-free.app 8080
```
--------------------------------
### Agent Guide for Building with Recall.ai's Meeting Bots
Source: https://docs.recall.ai/docs/agent-quickstarts
This guide is for agents building integrations with Recall.ai. It explains concepts, setup, flows, and constraints. Agents should use this as a reference and wait for explicit build instructions.
```markdown
# Agent Guide for Building with Recall.ai's Meeting Bots
This guide is an informational reference for agents building integrations with Recall.ai meeting bots, recordings, and transcripts.
The agent should use this guide to understand Recall.ai concepts, required setup, integration flows, and implementation constraints, but should wait for explicit instructions about what to build before taking action.
## Glossary
- `human` - the user directing the agent and performing any actions the agent cannot perform directly. The human is the operator for all required manual steps.
- `agent` - the LLM or coding agent completing this task. The agent is responsible for planning the work, executing the parts it can perform directly, and identifying any steps that require human action. Whenever human action is required, the agent must pause and provide the human with explicit, step-by-step instructions.
- `RECALL_REGION` - the specific Recall region the agent must use for all Recall operations in this task. All relevant Recall resources, data, and API requests must remain within this region. Only accepted values are `us-west-2`, `us-east-1`, `eu-central-1`, `ap-northeast-1`.
- `RECALL_API_KEY` - the Recall API key used to authenticate requests to the specified `RECALL_REGION`. Recall API keys are region-specific and cannot be used with any other region.
- `RECALL_WORKSPACE_VERIFICATION_SECRET` - The application uses this secret to verify that incoming webhooks, websockets, and callback requests were sent by Recall.ai. Workspace verification secrets are region-specific and cannot be used with any other region.
- `PUBLIC_API_BASE_URL` - the publicly reachable base URL of the backend server API that hosts the Recall integration. Recall uses this base URL for webhook deliveries, callback requests, or WebSocket connections to publicly exposed backend endpoints. The URL must be stable (it must not change each time the app or tunnel service starts), reachable over the public internet, and must not be `localhost`, a private IP address, or a frontend-only client URL. Valid examples include a production backend URL such as `https://api.myapp.com` or a stable public tunnel URL such as a static ngrok URL.
## Human-required setup
These are required human steps that the agent cannot complete on its own. This is generally a one-time setup for the app and Recall workspace. The agent must walk the human through these steps one at a time and must not continue with the integration until the human confirms each step is complete.
On application startup, the app should validate that all of the following required configuration values are present:
- `RECALL_REGION`
- `RECALL_API_KEY`
- `RECALL_WORKSPACE_VERIFICATION_SECRET`
- `PUBLIC_API_BASE_URL`
The app may also need a `RECALL_SVIX_WEBHOOK_SECRET` value for dashboard webhook endpoints if the webhook endpoint provides a separate per-endpoint webhook secret. See [Verifying requests from Recall.ai](#verifying-requests-from-recallai) for the condition that would require this webhook secret to be included.
If any of these values are missing, the agent should identify which value is missing and direct the human back to the corresponding setup step in this section before continuing. The app should also always print the recall region on startup.
### Step 1: Choose the Recall region
Ask the human which Recall region they want to use for this integration. They must choose exactly one of:
- `us-west-2`
- `us-east-1`
- `eu-central-1`
- `ap-northeast-1`
Once chosen, that region becomes `RECALL_REGION` for the rest of the integration. The human must use the same region for the dashboard, API key, workspace verification secret, webhooks, bots, recordings, and transcript requests.
The agent must ask the human to confirm the chosen `RECALL_REGION` before continuing.
```
--------------------------------
### Install Desktop Recording SDK (Stable)
Source: https://docs.recall.ai/docs/desktop-sdk
Install the stable version of the Desktop Recording SDK using npm.
```shell
npm install @recallai/desktop-sdk
```
--------------------------------
### Install Desktop Recording SDK (Nightly)
Source: https://docs.recall.ai/docs/desktop-sdk
Install the bleeding-edge nightly channel of the Desktop Recording SDK using npm.
```shell
npm install @recallai/desktop-sdk@nightly
```
--------------------------------
### Ngrok Tunnel Output Example
Source: https://docs.recall.ai/docs/local-webhook-development
This is an example of the output you will see in your terminal after successfully starting an ngrok tunnel. It shows the forwarding URL and connection details.
```text
Session Status online
Account johndoe (Plan: Free)
Version 3.5.0
Region United States (us)
Latency -
Web Interface http://127.0.0.1:4040
Forwarding https://my-static-domain.ngrok-free.app -> http://localhost:8080
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
```
--------------------------------
### Prepare and Start Desktop Audio Recording
Source: https://docs.recall.ai/docs/desktop-recording-sdk-methods
Prepares the SDK for recording entire desktop audio, which can be used for platforms not directly supported by the SDK or for applications like real-time note-takers. It then starts the recording with the obtained windowId and uploadToken.
```javascript
import RecallAiSdk from '@recallai/desktop-sdk';
const res = await Backend.fetch(`/api/create_sdk_recording`, AppState.client_token);
const payload = await res.json();
const windowId = await RecallAiSdk.prepareDesktopAudioRecording();
await RecallAiSdk.startRecording({
windowId,
uploadToken: res.upload_token
});
```
--------------------------------
### Start Recording with Upload Token
Source: https://docs.recall.ai/docs/desktop-sdk
Initializes the SDK and sets up an event listener for 'meeting-detected'. Upon detection, it requests an upload token from your backend and then starts the recording using the obtained token and the detected window ID.
```javascript
import RecallAiSdk from '@recallai/desktop-sdk';
RecallAiSdk.init({
api_url: "https://us-west-2.recall.ai"
});
RecallAiSdk.addEventListener('meeting-detected', async (evt) => {
// make a request to your application's backend to hit the Create Desktop SDK Upload endpoint
const res = await Backend.fetch(`/api/create_sdk_recording`, AppState.client_token);
const payload = await res.json();
await RecallAiSdk.startRecording({
windowId: evt.window.id,
uploadToken: res.upload_token
});
});
```
--------------------------------
### macOS Microphone Capture Example
Source: https://docs.recall.ai/docs/macos-permissions
Example of the `NSMicrophoneUsageDescription` key in `Info.plist` for recording voice during calls.
```xml
NSMicrophoneUsageDescription
This app uses the microphone to record your voice during calls.
```
--------------------------------
### Start Node.js Server and Ngrok Tunnel
Source: https://docs.recall.ai/docs/testing-webhooks-locally
This shell command sequence shows how to start a Node.js server on a specific port and then expose it publicly using ngrok with a custom domain.
```shell
# Start the server
npm run start --port 3000
# In a new terminal: Start the ngrok tunnel
ngrok http --domain my-static-domain.ngrok-free.app 3000
```
--------------------------------
### Real-Time Audio Stream Setup
Source: https://docs.recall.ai/docs/desktop-sdk
Subscribe to the raw audio stream of a meeting for custom transcription using your own models. This example shows how to request raw audio data and speech event tracking.
```javascript
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json',
Authorization: 'YOUR_API_KEY'
},
body: JSON.stringify({
recording_config: {
realtime_endpoints: [
{
type: 'desktop_sdk_callback',
events: ['audio_mixed_raw.data', // receive raw audio data
'participant_events.speech_on', // track who's speaking
'participant_events.speech_off',
'participant_events.update'
]
}
]
}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
```
--------------------------------
### Start Output Media
Source: https://docs.recall.ai/docs/stream-media
Manually start streaming a webpage's content as the bot's camera output into a meeting at any time while the bot is in a call.
```APIDOC
## Start Output Media
### Description
Starts streaming a webpage's audio and video into the meeting via the bot's camera feed.
### Method
POST
### Endpoint
/api/v1/bot/{bot_id}/output_media/
### Parameters
#### Path Parameters
- **bot_id** (string) - Required - The ID of the bot.
#### Request Body
- **camera** (object) - Required - Configuration for camera output.
- **kind** (string) - Required - The type of media to stream. Currently only `webpage` is supported.
- **config** (object) - Required - Webpage configuration.
- **url** (string) - Required - The URL of the webpage to stream.
```
--------------------------------
### sdk_upload.recording_started
Source: https://docs.recall.ai/docs/desktop-recording-sdk-webhooks
This webhook is sent when the Desktop SDK has started recording for this upload.
```APIDOC
## sdk_upload.recording_started
### Description
This webhook is sent when the Desktop SDK has started recording for this upload.
### Event
sdk_upload.recording_started
### Response Example
```json
{
"data": {
"data": {
"code": "recording_started",
"sub_code": null,
"updated_at": "2025-05-10T15:48:24.034072Z"
},
"recording": {
"id": "0206f11b-68ab-42b1-8a30-b85f60076e83",
"metadata": {}
},
"sdk_upload": {
"id": "fa08e580-d7b6-4f88-9f71-5b718c5a5f77",
"metadata": {}
}
},
"event": "sdk_upload.recording_started"
}
```
```
--------------------------------
### Start Ngrok Tunnel
Source: https://docs.recall.ai/docs/local-webhook-development
Use this command to start an ngrok tunnel, forwarding traffic from your static ngrok domain to a local port. Replace `{YOUR_STATIC_DOMAIN}` and `{PORT}` with your specific values.
```bash
ngrok http --domain {YOUR_STATIC_DOMAIN} {PORT}
```
--------------------------------
### Example provider_data_download_url structure
Source: https://docs.recall.ai/docs/transcription-faq
This JSON structure shows an example of the data found in the `provider_data_download_url` field, which can be used to determine the exact audio duration transcribed.
```json
{
"transcript": {
"id": "2c22e1b4-4477-4372-b080-9799a4c7bf5b",
"created_at": "2025-8-11T20:40:45.996425Z",
"status": {...},
"metadata": {...},
"data": {
"download_url": "...",
"provider_data_download_url: "...",
},
"diarization": null,
"provider": {
"assembly_ai_async": {}
}
}
}
```
--------------------------------
### Example Request Headers
Source: https://docs.recall.ai/docs/authenticating-requests-from-recallai
When you receive requests from Recall, these headers will be included. Ensure you have created a workspace secret for them to be present.
```text
Webhook-Id: 'msg_loFOjxBNrRLzqYUf'
Webhook-Timestamp: '1731705121'
Webhook-Signature: 'v1,rAvfW3dJ/X/qxhsaXPOyyCGmRKsaKWcsNccKXlIktD0='
```
--------------------------------
### Create Bot Request Body Example
Source: https://docs.recall.ai/docs/bot_create
This is an example of the JSON request body used to create a bot. It includes meeting details, bot configuration, and recording settings.
```json
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"meeting_url": {
"platform": "webex",
"meeting_subdomain": "string",
"meeting_personal_room_id": "string",
"meeting_mtid": "string",
"meeting_path": "string"
},
"bot_name": "Meeting Notetaker",
"join_at": "2026-05-30T19:58:27.200Z",
"recording_config": {
"transcript": {
"metadata": {
"additionalProp": "string"
},
"provider": {
"recallai_streaming": {
"language_code": "auto",
"spelling": [
{
"find": [
"string"
],
"replace": "string"
}
],
"key_terms": [
"string"
],
"filter_profanity": false,
"mode": "prioritize_accuracy"
},
"assembly_ai_async_chunked": {
"speech_model": null,
"language_code": "en_us",
"language_detection": true,
"language_confidence_threshold": 0.7,
"punctuate": true,
"format_text": true,
"multichannel": true,
"webhook_url": "https://your-webhook-url.tld/path"
}
}
}
}
}
```
--------------------------------
### Add Trusted Dependency for Bun
Source: https://docs.recall.ai/docs/desktop-sdk
If using Bun, add the Desktop Recording SDK to the trustedDependencies list in your package.json for proper installation.
```json
{
...,
"trustedDependencies": ["@recallai/desktop-sdk"]
}
```
--------------------------------
### Example Chat Message Response Structure
Source: https://docs.recall.ai/docs/receiving-chat-messages
This JSON structure shows an example of the response when fetching chat messages. Access the 'participant_events_download_url' to get all chat messages.
```json
{
"id": "f8e9d7c6-b5a4-4321-9876-543210fedcba",
"media_shortcuts": {
"participant_events": {
"id": "a3b2c1d0-e9f8-4567-8901-234567890abc",
"created_at": "2025-08-15T14:22:17.123456Z",
"status": {
"code": "done",
"sub_code": null,
"updated_at": "2025-08-15T14:28:33.987654Z"
},
"metadata": {},
"data": {
"participant_events_download_url": "...",
...
}
}
},
"metadata": {}
}
```
--------------------------------
### Initialize the Desktop Recording SDK
Source: https://docs.recall.ai/docs/desktop-sdk
Initialize the Desktop Recording SDK once at startup, providing the appropriate apiUrl for your Recall.ai workspace region.
```javascript
const RecallAiSdk = require('@recallai/desktop-sdk');
RecallAiSdk.init({
apiUrl: "https://us-west-2.recall.ai"
});
```
--------------------------------
### Calendar Update Webhook Example
Source: https://docs.recall.ai/docs/calendar-v2-webhooks
This webhook is sent when a calendar's data changes, such as its status becoming disconnected. Re-fetch the calendar to get the latest state.
```json
{
"event": "calendar.update",
"data": {
"calendar_id": string
}
}
```
--------------------------------
### Access Meeting Audio Stream
Source: https://docs.recall.ai/docs/stream-media
Access the live meeting audio stream from the webpage running within the bot. This example demonstrates how to get audio samples in AudioData objects.
```javascript
const mediaStream = await navigator.mediaDevices.getUserMedia({ audio: true });
const meetingAudioTrack = mediaStream.getAudioTracks()[0];
const trackProcessor = new MediaStreamTrackProcessor({ track: meetingAudioTrack });
const trackReader = trackProcessor.readable.getReader();
while (true) {
const { value, done } = await trackReader.read();
const audioData = value;
... // Do something with the audio data
}
```
--------------------------------
### Calendar Sync Events Webhook Example
Source: https://docs.recall.ai/docs/calendar-v2-webhooks
This webhook is sent when events on a calendar are created, updated, or deleted. Re-fetch calendar events using the provided timestamp to get changed events.
```json
{
"event": "calendar.sync_events",
"data": {
"calendar_id": string,
"last_updated_ts": string // iso 8601 formatted datetime
}
}
```
--------------------------------
### init({apiUrl})
Source: https://docs.recall.ai/docs/desktop-recording-sdk-methods
Initializes the SDK. You'll need to pass this parameter on startup. `apiUrl` is the URL corresponding to the region your Recall.ai workspace belongs to.
```APIDOC
## init({apiUrl})
### Description
Initializes the SDK. You'll need to pass this parameter on startup.
`apiUrl`: The URL corresponding to the region your Recall.ai workspace belongs to:
| Region | Base URL |
| :----------------- | :--------------------------------- |
| US (Pay-as-you-go) | |
| US (Monthly plan) | |
| EU | |
| Japan | |
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
* **apiUrl** (string) - Required - The URL corresponding to the region your Recall.ai workspace belongs to.
### Request Example
```javascript
RecallAiSdk.init({
apiUrl: "https://us-west-2.recall.ai",
});
```
### Response
#### Success Response (200)
None
#### Response Example
None
```
--------------------------------
### Verify HTTP Requests from Recall.ai
Source: https://docs.recall.ai/docs/authenticating-requests-from-recallai
This example demonstrates how to integrate the `verifyRequestFromRecall` function into an HTTP server to handle and verify incoming requests. It differentiates between GET requests (no payload) and POST requests (with payload) and logs verification status.
```typescript
import http from "http";
import { WebSocketServer } from "ws";
import { env } from "./config/env";
import { verifyRequestFromRecall } from "./verify-request-from-recall";
const server = http.createServer();
/**
* HTTP server for handling HTTP requests from Recall.ai
*/
server.on("request", async (req, res) => {
try {
// Get request headers
const headers = Object.fromEntries(
Object.entries(req.headers)
.map(([key, value]) => [
key.toLowerCase(),
typeof value === "string" ? value : value?.join(",") ?? ''
])
)
switch (req.method) {
// Verify GET requests which don't have a body/payload
case "GET": {
verifyRequestFromRecall({
secret: env.VERIFICATION_SECRET,
headers,
payload: null,
});
break;
}
// Verify requests which have a body/payload
case "POST": {
// Must be the raw body from the request
const bodyChunks: Buffer[] = [];
for await (const chunk of req) {
bodyChunks.push(chunk);
}
const rawBody = Buffer.concat(bodyChunks).toString("utf-8");
verifyRequestFromRecall({
secret: env.VERIFICATION_SECRET,
headers,
payload: rawBody,
});
break;
}
default: {
throw new Error(`Method not allowed: ${req.method}`);
}
}
console.log(`HTTP request verified: ${req.method} ${req.url}`);
res.writeHead(200, { "Content-Type": "text/plain" });
res.end("HTTP request verified");
} catch (error) {
console.error(`Error verifying HTTP request from Recall.ai: ${req.method} ${req.url}`, error);
res.writeHead(400, { "Content-Type": "text/plain" });
res.end("Request not verified");
}
});
/**
* Start the server
*/
server.listen(env.PORT, "0.0.0.0", () => {
console.log(`Server is running on port ${env.PORT}`);
});
```
--------------------------------
### Initialize and Start Recording with Desktop SDK
Source: https://docs.recall.ai/docs/desktop-sdk
Integrate the Recall AI Desktop SDK by initializing it with your API URL and requesting necessary permissions. This snippet demonstrates event listeners for meeting detection and recording end.
```javascript
import RecallAiSdk from '@recallai/desktop-sdk';
RecallAiSdk.init({
api_url: "https://us-west-2.recall.ai"
});
RecallAiSdk.requestPermission("accessibility");
RecallAiSdk.requestPermission("microphone");
RecallAiSdk.requestPermission("screen-capture");
RecallAiSdk.addEventListener('meeting-detected', async (evt) => {
const res = await Backend.fetch(`/api/create_sdk_recording`, AppState.client_token);
const payload = await res.json();
await RecallAiSdk.startRecording({
windowId: evt.window.id,
uploadToken: res.upload_token
});
});
RecallAiSdk.addEventListener('recording-ended', async (evt) => {
console.log(`Uploaded evt.window.id `);
});
```
--------------------------------
### Run Complete Build Process
Source: https://docs.recall.ai/docs/publishing-your-app
Execute this command to package, code sign, notarize, and prepare your application for distribution. It automates multiple steps including waiting for Apple's approval.
```bash
electron-forge make
```
--------------------------------
### Create Desktop SDK Upload (Minimal Request)
Source: https://docs.recall.ai/docs/desktop-sdk
Initiates a recording upload by making a POST request to the SDK upload endpoint. This minimal configuration defaults to recording video and participant events. Ensure your API key is included in the Authorization header.
```javascript
const url = 'https://us-west-2.recall.ai/api/v1/sdk_upload/';
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json',
Authorization: 'YOUR_API_KEY'
}
};
fetch(url, options)
```
--------------------------------
### Create Bot with Separate Videos Configured (TypeScript)
Source: https://docs.recall.ai/docs/how-to-get-separate-videos-per-participant-async
This TypeScript example demonstrates how to create a bot using the Fetch API to record separate MP4 files for each participant. It includes setting `video_mixed_layout` to `gallery_view_v2` and `video_separate_mp4` to an empty object in the request body. Remember to update `YOUR_RECALL_API_KEY` and `YOUR_MEETING_URL`.
```typescript
const response = await fetch("https://us-west-2.recall.ai/api/v1/bot", {
method: "POST",
headers: {
"accept": "application/json",
"content-type": "application/json"
"authorization": "YOUR_RECALL_API_KEY" // Update this
},
body: JSON.stringify({
meeting_url: "YOUR_MEETING_URL", // Update this
recording_config: {
video_mixed_layout: "gallery_view_v2", // Add this to your request body
video_separate_mp4: {} // Add this to your request body
}
})
});
if (!response.ok) {
throw new Error(`Error: ${response.status} ${response.statusText}`);
}
const data = await response.json();
```
--------------------------------
### Example Formatted Transcript Output
Source: https://docs.recall.ai/docs/transcription-faq
This is an example of the JSON output after processing a raw transcript with the `parseTranscript` function, showing speaker, paragraph, and timestamp details.
```json
[
{
"speaker": "Gerry Saporito",
"paragraph": "Hey Jake, how's it going?",
"start_timestamp": {
"relative": 187.37506,
"absolute": "2025-10-14T14:38:09.845Z"
},
"end_timestamp": {
"relative": 190.88506,
"absolute": "2025-10-14T14:38:13.355Z"
},
"duration_seconds": 3.5100000000000193
},
{
"speaker": "Jake Miyazaki",
"paragraph": "Hey Gerry, doing well? Have you tried Recall.ai transcription yet? It works very well",
"start_timestamp": {
"relative": 250.60507,
"absolute": "2025-10-14T14:39:13.075Z"
},
"end_timestamp": {
"relative": 275.91504,
"absolute": "2025-10-14T14:39:38.385Z"
},
"duration_seconds": 25.309969999999964
},
...
]
```
--------------------------------
### Initialize the SDK
Source: https://docs.recall.ai/docs/desktop-recording-sdk-methods
Initializes the SDK with the appropriate API URL for your Recall.ai workspace region. This must be called on startup.
```javascript
RecallAiSdk.init({
apiUrl: "https://us-west-2.recall.ai",
});
```
--------------------------------
### prepareDesktopAudioRecording()
Source: https://docs.recall.ai/docs/desktop-recording-sdk-methods
In addition to recording video-platform meetings, the Desktop Recording SDK can also record whole-desktop audio. This can be used to implement, for example, realtime note-takers for in person meetings or for platforms not yet supported by the Desktop Recording SDK.
```APIDOC
## prepareDesktopAudioRecording()
### Description
In addition to recording video-platform meetings, the Desktop Recording SDK can also record whole-desktop audio. This can be used to implement, for example, realtime note-takers for in person meetings or for platforms not yet supported by the Desktop Recording SDK.
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
None
### Request Example
```javascript
import RecallAiSdk from '@recallai/desktop-sdk';
const res = await Backend.fetch(`/api/create_sdk_recording`, AppState.client_token);
const payload = await res.json();
const windowId = await RecallAiSdk.prepareDesktopAudioRecording();
await RecallAiSdk.startRecording({
windowId,
uploadToken: res.upload_token
});
```
### Response
#### Success Response (200)
* **windowId** (string) - The ID for the desktop audio recording.
#### Response Example
None
```
--------------------------------
### Example Participant Events Response
Source: https://docs.recall.ai/docs/meeting-participants-events
This is an example of the JSON response structure when retrieving participant events. The `data.download_url` field will contain a pre-signed URL for downloading the artifact.
```json
{
"next": "...",
"previous": "...",
"results": [
{
"id": "9aa74189-92d0-410a-b247-4239e42c2465",
"recording_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-12-01T21:29:51.019Z",
"status": {
"code": "string",
"sub_code": "string",
"updated_at": "2024-12-01T21:29:51.019Z"
},
"metadata": {},
"data": {
"participant_events_download_url": "https://...",
"speaker_timeline_download_url": "https://...",
"participants_download_url": "https://..."
}
}
]
}
```
--------------------------------
### Configure Bot Instance for Output Media
Source: https://docs.recall.ai/docs/stream-media
To resolve choppy audio/video output, upgrade your bot instance to 'web_4_core'. Include this JSON configuration in your Create Bot request.
```json
{
"variant": {
"zoom": "web_4_core",
"google_meet": "web_4_core",
"microsoft_teams": "web_4_core"
}
}
```
--------------------------------
### Example Webhook Events for Bot Creation
Source: https://docs.recall.ai/docs/testing-webhooks-locally
These are example JSON payloads representing different stages of a bot joining a Google Meet call. Your server will receive these events.
```json
received event: {"data":{"data":{"code":"joining_call","updated_at":"2024-02-17T16:44:00.505440+00:00","sub_code":null}}, "bot": {"id": "92e24581-f82b-401a-8f75-88e64b04c24e", "metadata": {}}},"event":"bot.joining_call"}
received event: {"data":{"data":{"code":"in_waiting_room","updated_at":"2024-02-17T16:44:23.288984+00:00","sub_code":null}}, "bot": {"id": "92e24581-f82b-401a-8f75-88e64b04c24e", "metadata": {}}},"event":"bot.in_waiting_room"}
received event: {"data":{"data":{"code":"in_call_not_recording","updated_at":"2024-02-17T16:44:23.288984+00:00","sub_code":null}}, "bot": {"id": "92e24581-f82b-401a-8f75-88e64b04c24e", "metadata": {}}},"event":"bot.in_call_not_recording"}
received event: {"data":{"data":{"code":"in_call_recording","updated_at":"2024-02-17T16:44:23.288984+00:00","sub_code":null}}, "bot": {"id": "92e24581-f82b-401a-8f75-88e64b04c24e", "metadata": {}}},"event":"bot.in_call_recording"}
```
--------------------------------
### Create a Bot with TypeScript
Source: https://docs.recall.ai/docs/how-to-get-mixed-video-mp4
This TypeScript example shows how to create a bot using the fetch API. Ensure you update YOUR_RECALL_API_KEY and YOUR_MEETING_URL. The `recording_config` object can be used to specify `video_mixed_layout` and `video_separate_mp4`.
```typescript
const response = await fetch("https://us-west-2.recall.ai/api/v1/bot", {
method: "POST",
headers: {
"accept": "application/json",
"content-type": "application/json"
"authorization": "YOUR_RECALL_API_KEY" // Update this
},
body: JSON.stringify({
meeting_url: "YOUR_MEETING_URL", // Update this
recording_config: {
video_mixed_layout: "gallery_view_v2", // Add this to your request body
video_separate_mp4: {} # Add this to your request body
}
})
});
if (!response.ok) {
throw new Error(`Error: ${response.status} ${response.statusText}`);
}
const data = await response.json();
```
--------------------------------
### Google Meets Meeting Metadata Example
Source: https://docs.recall.ai/docs/meeting-metadata-and-participants
Example JSON structure for meeting metadata retrieved from Google Meets. The title is populated if the bot is signed in and listed on the calendar invite.
```json
{
"data": {
"title": "John Smith's Personal Meeting Room",
},
},
...
}
```
--------------------------------
### Get Recall Mixed Audio Parts (TypeScript)
Source: https://docs.recall.ai/docs/how-to-get-mixed-audio-async
Extracts download URLs from mixed audio data. Use this to iterate through audio parts and get their respective download links.
```typescript
const get_recall_mixed_audio_parts = async (args: { mixed_audio_data: any }) => {
const { mixed_audio_data } = args;
const audios = mixed_audio_data.results;
for (const audio of audios) {
const download_url = audio.data.download_url
console.log(download_url)
}
return audios
}
const mixed_audio_parts = await get_recall_mixed_audio_parts({ mixed_audio_data })
```
--------------------------------
### startRecording({windowId, uploadToken})
Source: https://docs.recall.ai/docs/desktop-recording-sdk-methods
Begin recording. This function is usually called inside an event listener for `meeting-detected`. `windowId` is provided by the `meeting-detected` callback, and `uploadToken` is acquired by creating an SDK Upload on your backend.
```APIDOC
## startRecording({windowId, uploadToken})
### Description
Begin recording. This function is usually called inside an event listener for `meeting-detected`. `windowId` is provided by the `meeting-detected` callback, and `uploadToken` is acquired by creating an SDK Upload on your backend.
See [Real-Time Event Payloads](https://docs.recall.ai/docs/real-time-event-payloads#participant_events) for more details on the schema of the data.
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
* **windowId** (string) - Required - The ID of the window to record, provided by the `meeting-detected` callback.
* **uploadToken** (string) - Required - An upload token acquired by creating an SDK Upload on your backend.
### Request Example
```javascript
RecallAiSdk.startRecording({
windowId: ...,
uploadToken: ...
});
```
### Response
#### Success Response (200)
None
#### Response Example
None
```
--------------------------------
### Start RTMS Recording with Recall API
Source: https://docs.recall.ai/docs/meeting-direct-connect-for-zoom-rtms
Initiates a meeting recording via Recall's Direct Connect API when a Zoom RTMS started event is received. Requires meeting details and server URLs from Zoom.
```javascript
async function startRecordingRtms(payload) {
// Start the recording via Recall
const { meeting_uuid, rtms_stream_id, server_urls } = payload;
const response = await fetch(`https://us-east-1.recall.ai/api/v1/meeting_direct_connect`, {
method: 'POST',
headers: {
'Authorization': `Token ${RECALL_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
zoom_rtms: {
meeting_uuid,
rtms_stream_id,
server_urls,
signature: generateSignature(meeting_uuid, rtms_stream_id)
},
// Other options (e.g. recordings, real time events, webhooks, transcriptions)
// are consistent with https://docs.recall.ai/reference/bot_create
recording_config: {
video_mixed_mp4: {}
}
})
});
const recallRtms = await response.json();
await saveRecordingToDatabase({
recallId: recallRtms.id,
status: recallRtms.status.code,
});
}
```
--------------------------------
### Create Bot with Separate MP4 Video Config (TypeScript)
Source: https://docs.recall.ai/docs/how-to-get-separate-audio-per-participant-async
This TypeScript example demonstrates how to create a bot using the fetch API, configuring it to separate raw MP4 video streams per participant. Remember to update the meeting URL and API key.
```typescript
const response = await fetch("https://us-west-2.recall.ai/api/v1/bot", {
method: "POST",
headers: {
"accept": "application/json",
"content-type": "application/json"
"authorization": "YOUR_RECALL_API_KEY" // Update this
},
body: JSON.stringify({
meeting_url: "YOUR_MEETING_URL", // Update this
recording_config: {
video_separate_mp4: {} // Add this to your request body
}
})
});
if (!response.ok) {
throw new Error(`Error: ${response.status} ${response.statusText}`);
}
const data = await response.json();
```
--------------------------------
### Create Bot with Mixed Audio MP3 Config (Python)
Source: https://docs.recall.ai/docs/how-to-get-mixed-audio-async
This Python script shows how to initiate a bot to create a mixed MP3 recording. Remember to replace YOUR_MEETING_URL and YOUR_RECALL_API_KEY.
```python
import requests
response = requests.post(
"https://us-west-2.recall.ai/api/v1/bot",
json={
"meeting_url": "YOUR_MEETING_URL", # Update this
"recording_config": {
"audio_mixed_mp3": {} # Add this to your request body
}
},
headers={
"accept": "application/json",
"content-type": "application/json",
"authorization": "YOUR_RECALL_API_KEY" # Update this
}
)
if not response.ok:
errorMessage = f"Error: {response.status_code} - {response.text}"
raise requests.RequestException(errorMessage)
result = response.json()
```