Get one bridge, including the chat accounts connected through it.
Get bridge
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"),
)
bridge, err := client.Bridges.Get(context.TODO(), "local-whatsapp")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", bridge.ID)
}
{
"id": "id",
"accounts": [
{
"accountID": "accountID",
"bridge": {
"id": "id",
"provider": "cloud",
"type": "type"
},
"status": "connected",
"user": {
"id": "id",
"cannotMessage": true,
"email": "email",
"fullName": "fullName",
"imgURL": "imgURL",
"isSelf": true,
"phoneNumber": "phoneNumber",
"username": "username"
},
"capabilities": {
"foo": "bar"
},
"loginID": "loginID",
"network": "network",
"statusText": "statusText"
}
],
"activeAccountCount": 0,
"displayName": "displayName",
"provider": "cloud",
"status": "available",
"supportsMultipleAccounts": true,
"type": "type",
"network": "network",
"statusText": "statusText"
}Returns Examples
{
"id": "id",
"accounts": [
{
"accountID": "accountID",
"bridge": {
"id": "id",
"provider": "cloud",
"type": "type"
},
"status": "connected",
"user": {
"id": "id",
"cannotMessage": true,
"email": "email",
"fullName": "fullName",
"imgURL": "imgURL",
"isSelf": true,
"phoneNumber": "phoneNumber",
"username": "username"
},
"capabilities": {
"foo": "bar"
},
"loginID": "loginID",
"network": "network",
"statusText": "statusText"
}
],
"activeAccountCount": 0,
"displayName": "displayName",
"provider": "cloud",
"status": "available",
"supportsMultipleAccounts": true,
"type": "type",
"network": "network",
"statusText": "statusText"
}