Contacts
Search contacts
client.Search.Contacts(ctx, accountID, query) (*SearchContactsResponse, error)
/v1/search/contacts/{accountID}
Search contacts across on a specific account using the network's search API. Only use for creating new chats.
Parameters
accountID string
Account ID this resource belongs to.
Returns
Search contacts
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.Search.Contacts(
context.TODO(),
"local-whatsapp_ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc",
beeperdesktopapi.SearchContactsParams{
Query: "x",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Items)
}
{
"items": [
{
"id": "id",
"cannotMessage": true,
"email": "email",
"fullName": "fullName",
"imgURL": "imgURL",
"isSelf": true,
"phoneNumber": "phoneNumber",
"username": "username"
}
]
}
Returns Examples
{
"items": [
{
"id": "id",
"cannotMessage": true,
"email": "email",
"fullName": "fullName",
"imgURL": "imgURL",
"isSelf": true,
"phoneNumber": "phoneNumber",
"username": "username"
}
]
}