Skip to content
Download Beeper

Focus Beeper Desktop app

client.focus(FocusParams { chatID, draftAttachmentPath, draftText, messageID } body?, RequestOptionsoptions?): FocusResponse { success }
POST/v1/focus

Focus Beeper Desktop and optionally open a specific chat, jump to a message, or pre-fill text and an image.

ParametersExpand Collapse
body: FocusParams { chatID, draftAttachmentPath, draftText, messageID }
chatID?: string

Optional Beeper chat ID (or local chat ID) to focus after opening the app. If omitted, only opens/focuses the app.

draftAttachmentPath?: string

Optional local image path to populate in the message input field.

draftText?: string

Optional plain text to populate in the message input field.

messageID?: string

Optional message ID. Jumps to that message in the chat when opening.

ReturnsExpand Collapse
FocusResponse { success }

Response indicating successful app focus action.

success: boolean

Whether the app was successfully opened/focused.

Focus Beeper Desktop app

import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop({
  accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});

const response = await client.focus();

console.log(response.success);
{
  "success": true
}
Returns Examples
{
  "success": true
}