List
List messages
client.Messages.List(ctx, chatID, query) (*CursorList[Message], error)
/v1/chats/{chatID}/messages
List all messages in a chat with cursor-based pagination. Sorted by timestamp.
Parameters
chatID string
Unique identifier of the chat.
Returns
List messages
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"),
)
page, err := client.Messages.List(
context.TODO(),
"!NCdzlIaMjZUmvmvyHU:beeper.com",
beeperdesktopapi.MessageListParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"hasMore": true,
"items": [
{
"id": "1343993",
"accountID": "local-signal_ba_7N74FrU29pxij_TnqfxeUHj53FY",
"chatID": "!signal_adamvy:local-signal.localhost",
"senderID": "@adamvy:local-signal.localhost",
"sortKey": "821744079",
"timestamp": "2025-08-28T11:04:29.621Z",
"attachments": [
{
"type": "unknown",
"duration": 0,
"fileName": "fileName",
"fileSize": 0,
"isGif": true,
"isSticker": true,
"isVoiceNote": true,
"mimeType": "mimeType",
"posterImg": "posterImg",
"size": {
"height": 0,
"width": 0
},
"srcURL": "srcURL"
}
],
"isSender": false,
"isUnread": false,
"reactions": [
{
"id": "id",
"participantID": "participantID",
"reactionKey": "reactionKey",
"emoji": true,
"imgURL": "imgURL"
}
],
"senderName": "Adam Van Ymeren",
"text": "Hey, can we reschedule our meeting to 3pm?"
}
]
}
Returns Examples
{
"hasMore": true,
"items": [
{
"id": "1343993",
"accountID": "local-signal_ba_7N74FrU29pxij_TnqfxeUHj53FY",
"chatID": "!signal_adamvy:local-signal.localhost",
"senderID": "@adamvy:local-signal.localhost",
"sortKey": "821744079",
"timestamp": "2025-08-28T11:04:29.621Z",
"attachments": [
{
"type": "unknown",
"duration": 0,
"fileName": "fileName",
"fileSize": 0,
"isGif": true,
"isSticker": true,
"isVoiceNote": true,
"mimeType": "mimeType",
"posterImg": "posterImg",
"size": {
"height": 0,
"width": 0
},
"srcURL": "srcURL"
}
],
"isSender": false,
"isUnread": false,
"reactions": [
{
"id": "id",
"participantID": "participantID",
"reactionKey": "reactionKey",
"emoji": true,
"imgURL": "imgURL"
}
],
"senderName": "Adam Van Ymeren",
"text": "Hey, can we reschedule our meeting to 3pm?"
}
]
}