---
updatedAt: 2026-10-14T21:20:49.000Z
agentTools:
  projectIndex: https://docs.recall.ai/llms.txt
---

# Desktop Recording SDK Methods

Use the Desktop Recording SDK methods to initialize the SDK, manage permissions, and control recording sessions from your app.

The Desktop Recording SDK provides methods to control recording sessions and manage permissions. Below is a list of the currently-available SDK methods and their definitions:

<br />

## `init({apiUrl})`

```javascript
RecallAiSdk.init({
  apiUrl: "https://us-west-2.recall.ai",
});
```

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) | <https://us-west-2.recall.ai>      |
| US (Monthly plan)  | <https://us-east-1.recall.ai>      |
| EU                 | <https://eu-central-1.recall.ai>   |
| Japan              | <https://ap-northeast-1.recall.ai> |

## `requestPermission(permission)`

```javascript
let permission = ...;
RecallAiSdk.requestPermission(permission);
```

You can manually request a permission using `requestPermission`. This will cause a dialog box to be presented to the user if the permission hasn't been requested before. If it has been declined before, nothing will happen. You can pass in one of the permissions defined <Anchor target="_blank" href="doc:macos-permissions#available-permissions">here</Anchor>.

## `startRecording({windowId, uploadToken})`

```javascript
RecallAiSdk.startRecording({
  windowId: ...,
  uploadToken: ...
});

```

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.

## `stopRecording({windowId})`

```javascript
RecallAiSdk.stopRecording({
  windowId: ...,
});

```

Stop recording. This function can be called to end a recording before the meeting itself has naturally ended.

## `pauseRecording({windowId})`

```javascript
RecallAiSdk.pauseRecording({
  windowId: ...,
});

```

Pause recording. This will make cause the resulting video or audio to be blank for the duration of the paused period.

## `resumeRecording({windowId})`

```javascript
RecallAiSdk.resumeRecording({
  windowId: ...,
});

```

Resume recording.

## `prepareDesktopAudioRecording()`

```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
});
```

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.

## `shutdown()`

```javascript
RecallAiSdk.shutdown();
```

Shuts down the SDK. To use it again, you must call `init()` again. Calling `shutdown()` while a local recording is in progress, or while uploads are still draining, can lose media. Raw Media recordings are not affected. See [SDK Safe Shutdown and Recovery](https://docs.recall.ai/docs/dsdk-safe-shutdown).

<br />