Skip to content
  • Auto
  • Light
  • Dark
Download Beeper

Focus

Focus Beeper Desktop app
client.Focus(ctx, body) (*FocusResponse, error)
post/v1/focus

Focus Beeper Desktop and optionally navigate to a specific chat, message, or pre-fill draft text and attachment.

ParametersExpand Collapse
body FocusParams
ChatID param.Field[string]optional

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

DraftAttachmentPath param.Field[string]optional

Optional draft attachment path to populate in the message input field.

DraftText param.Field[string]optional

Optional draft text to populate in the message input field.

MessageID param.Field[string]optional

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

ReturnsExpand Collapse
type FocusResponse struct{…}

Response indicating successful app focus action.

Success bool

Whether the app was successfully opened/focused.

Focus Beeper Desktop app
package main

import (
  "context"
  "fmt"

  "github.com/beeper/desktop-api-go"
  "github.com/beeper/desktop-api-go/option"
)

func main() {
  client := beeperdesktopapi.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  response, err := client.Focus(context.TODO(), beeperdesktopapi.FocusParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Success)
}
{
  "success": true
}
Returns Examples
{
  "success": true
}