Skip to content
Download Beeper

Get bridge capabilities

client.Bridges.GetCapabilities(ctx, bridgeID) (*ProvisioningCapabilities, error)
GET/v1/bridges/{bridgeID}/capabilities

Get advanced network capabilities for a bridge. This endpoint is intended for clients that build custom connect or chat-creation flows.

ParametersExpand Collapse
bridgeID string

Bridge ID.

minLength1
ReturnsExpand Collapse
type ProvisioningCapabilities struct{…}

Advanced network capabilities for account lookup and group creation.

GroupCreation map[string, GroupTypeCapabilities]
TypeDescription string
Avatar GroupFieldCapabilityOptional

Group creation field capability.

Allowed bool
MaxLength int64Optional
MinLength int64Optional
Required boolOptional

Disappearing-message timer capability.

Types []string
One of the following:
const DisappearingTimerCapabilityTypeEmpty DisappearingTimerCapabilityType = ""
const DisappearingTimerCapabilityTypeAfterRead DisappearingTimerCapabilityType = "after_read"
const DisappearingTimerCapabilityTypeAfterSend DisappearingTimerCapabilityType = "after_send"
OmitEmptyTimer boolOptional
Timers []int64Optional
Disappear GroupFieldCapabilityOptional

Group creation field capability.

Allowed bool
MaxLength int64Optional
MinLength int64Optional
Required boolOptional

Disappearing-message timer capability.

Types []string
One of the following:
const DisappearingTimerCapabilityTypeEmpty DisappearingTimerCapabilityType = ""
const DisappearingTimerCapabilityTypeAfterRead DisappearingTimerCapabilityType = "after_read"
const DisappearingTimerCapabilityTypeAfterSend DisappearingTimerCapabilityType = "after_send"
OmitEmptyTimer boolOptional
Timers []int64Optional

Group creation field capability.

Allowed bool
MaxLength int64Optional
MinLength int64Optional
Required boolOptional

Disappearing-message timer capability.

Types []string
One of the following:
const DisappearingTimerCapabilityTypeEmpty DisappearingTimerCapabilityType = ""
const DisappearingTimerCapabilityTypeAfterRead DisappearingTimerCapabilityType = "after_read"
const DisappearingTimerCapabilityTypeAfterSend DisappearingTimerCapabilityType = "after_send"
OmitEmptyTimer boolOptional
Timers []int64Optional
Parent GroupFieldCapabilityOptional

Group creation field capability.

Allowed bool
MaxLength int64Optional
MinLength int64Optional
Required boolOptional

Disappearing-message timer capability.

Types []string
One of the following:
const DisappearingTimerCapabilityTypeEmpty DisappearingTimerCapabilityType = ""
const DisappearingTimerCapabilityTypeAfterRead DisappearingTimerCapabilityType = "after_read"
const DisappearingTimerCapabilityTypeAfterSend DisappearingTimerCapabilityType = "after_send"
OmitEmptyTimer boolOptional
Timers []int64Optional
Participants GroupFieldCapabilityOptional

Group creation field capability.

Allowed bool
MaxLength int64Optional
MinLength int64Optional
Required boolOptional

Disappearing-message timer capability.

Types []string
One of the following:
const DisappearingTimerCapabilityTypeEmpty DisappearingTimerCapabilityType = ""
const DisappearingTimerCapabilityTypeAfterRead DisappearingTimerCapabilityType = "after_read"
const DisappearingTimerCapabilityTypeAfterSend DisappearingTimerCapabilityType = "after_send"
OmitEmptyTimer boolOptional
Timers []int64Optional
Topic GroupFieldCapabilityOptional

Group creation field capability.

Allowed bool
MaxLength int64Optional
MinLength int64Optional
Required boolOptional

Disappearing-message timer capability.

Types []string
One of the following:
const DisappearingTimerCapabilityTypeEmpty DisappearingTimerCapabilityType = ""
const DisappearingTimerCapabilityTypeAfterRead DisappearingTimerCapabilityType = "after_read"
const DisappearingTimerCapabilityTypeAfterSend DisappearingTimerCapabilityType = "after_send"
OmitEmptyTimer boolOptional
Timers []int64Optional
Username GroupFieldCapabilityOptional

Group creation field capability.

Allowed bool
MaxLength int64Optional
MinLength int64Optional
Required boolOptional

Disappearing-message timer capability.

Types []string
One of the following:
const DisappearingTimerCapabilityTypeEmpty DisappearingTimerCapabilityType = ""
const DisappearingTimerCapabilityTypeAfterRead DisappearingTimerCapabilityType = "after_read"
const DisappearingTimerCapabilityTypeAfterSend DisappearingTimerCapabilityType = "after_send"
OmitEmptyTimer boolOptional
Timers []int64Optional

Identifier lookup capabilities for this bridge.

AnyPhone bool
ContactList bool
CreateDM bool
LookupEmail bool
LookupPhone bool
LookupUsername bool
ImagePackImport boolOptional

Get bridge capabilities

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"),
  )
  provisioningCapabilities, err := client.Bridges.GetCapabilities(context.TODO(), "local-whatsapp")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", provisioningCapabilities.ResolveIdentifier)
}
{
  "group_creation": {
    "foo": {
      "type_description": "type_description",
      "avatar": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "disappear": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "name": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "parent": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "participants": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "topic": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "username": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      }
    }
  },
  "resolve_identifier": {
    "any_phone": true,
    "contact_list": true,
    "create_dm": true,
    "lookup_email": true,
    "lookup_phone": true,
    "lookup_username": true,
    "search": true
  },
  "image_pack_import": true
}
Returns Examples
{
  "group_creation": {
    "foo": {
      "type_description": "type_description",
      "avatar": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "disappear": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "name": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "parent": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "participants": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "topic": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      },
      "username": {
        "allowed": true,
        "max_length": 0,
        "min_length": 0,
        "required": true,
        "settings": {
          "types": [
            ""
          ],
          "omit_empty_timer": true,
          "timers": [
            0
          ]
        }
      }
    }
  },
  "resolve_identifier": {
    "any_phone": true,
    "contact_list": true,
    "create_dm": true,
    "lookup_email": true,
    "lookup_phone": true,
    "lookup_username": true,
    "search": true
  },
  "image_pack_import": true
}