List available bridges. A bridge is a chat-network connector that can connect or reconnect chat accounts. Connected accounts use the same Account schema as GET /v1/accounts.
List available bridges
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"),
)
bridges, err := client.Bridges.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", bridges.Items)
}
{
"items": [
{
"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
{
"items": [
{
"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"
}
]
}