Send
Send a message
client.Messages.Send(ctx, chatID, body) (*MessageSendResponse, error)
/v1/chats/{chatID}/messages
Send a text message to a specific chat. Supports replying to existing messages. Returns the sent message ID.
Parameters
chatID string
Unique identifier of the chat.
Returns
Send a message
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.Messages.Send(
context.TODO(),
"!NCdzlIaMjZUmvmvyHU:beeper.com",
beeperdesktopapi.MessageSendParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
}
{
"success": true,
"error": "error",
"chatID": "!signal_adamvy:local-signal.localhost",
"pendingMessageID": "m1694783291234567"
}
Returns Examples
{
"success": true,
"error": "error",
"chatID": "!signal_adamvy:local-signal.localhost",
"pendingMessageID": "m1694783291234567"
}