Install WhatsApp phone number in Bird CRM

Install a connector into Bird CRM

Once you have acquired the long lived access token you can then install a WhatsApp connector into Bird CRM. This will complete the integration between Bird and WhatsApp so you can send messages via the Bird CRM APIs.

Create a new connector from a template.

POST/workspaces/{workspaceId}/connectors
Authorization
Path parameters
workspaceId*string (uuid)
Body
name*connector name
connectorTemplateReftemplate to base this connector on by ref
argumentsarguments to provide to each action invocation on this connector
securityArgumentsSecurityArgumentsMap

Provide the arguments required by the security scheme(s) on the connector template.

channelConversationalStatusEnabledControls the default value for channel's conversational flag.
invitationTokenInvitation token to allow installation of connectors that are not GA.
Response

OK

Body
id*string (uuid)

The ID of this connector.

workspaceIdstring (uuid)

The ID of the workspace this connector belongs to.

routingKeynullable string
name*string

The Name of this connector.

regionstring

The Region in which this connector was installed in.

descriptionstring

The Description of this connector.

argumentsnullable object

Pre-configured arguments for this connector.

channelChannelConfig (object)
numbernullable NumberConfig (object)
connectorTemplateSlugstring

The slug for the template this connector is based on.

connectorTemplateRefstring

The ref for the template this connector is based on.

dataFetchingThe connector's data fetching synchronisation configuration and state.
dataCapturenullable object
createdAt*string (date-time)

When the connector was created.

updatedAtstring (date-time)

When the connector was last updated.

Request
const response = await fetch('/workspaces/{workspaceId}/connectors', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer jwt",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text"
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "routingKey": "text",
  "name": "text",
  "region": "text",
  "description": "text",
  "arguments": {
    "someArgument": "someValue"
  },
  "channel": {
    "channelId": "123e4567-e89b-12d3-a456-426614174000",
    "platform": "text"
  },
  "number": {
    "profileId": "123e4567-e89b-12d3-a456-426614174000",
    "numberId": "123e4567-e89b-12d3-a456-426614174000",
    "phoneNumber": "text",
    "capabilities": "mms-inbound,mms-outbound,sms-inbound,sms-outbound",
    "numberType": "mobile",
    "endpointType": "alpha-number",
    "country": "NL",
    "profileAttachments": [
      {
        "capability": "text",
        "profileId": "text",
        "variables": {
          "connectorId": "text"
        }
      }
    ]
  },
  "connectorTemplateSlug": "text",
  "connectorTemplateRef": "text",
  "dataFetching": {
    "schedule": "text",
    "streams": [
      {
        "eventName": "text",
        "streamName": "text",
        "eventStreamName": "text",
        "filter": "text",
        "initialState": "text",
        "endCondition": "text",
        "incremental": false,
        "duplicatesFilterCapacity": 0,
        "cursorField": "text"
      }
    ]
  },
  "dataCapture": {
    "captureEndpoint": "text"
  },
  "createdAt": "2024-12-21T11:50:55.882Z",
  "updatedAt": "2024-12-21T11:50:55.882Z"
}

The properties are as follows

  • Name - friendly name of the connector

  • wabaId - as per the embedded signup sessionInfo

  • phoneId - as per the embedded signup sessionInfo

  • phoneNumber - as per the either the Bird number you acquired or the number you provided

  • mbPhoneId - the ID of the Bird phone number (if using a Bird number)

  • accessToken - the access token you exchanged in the here

curl --location 'https://api.bird.com/workspaces/{{workspaceId}}/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: AccessKey <your-access-key>' \
--data '{
    "connectorTemplateRef": "whatsapp:1",
    "name": "{{name}}",
    "arguments": {  
        "wabaId": "{{wabaId}}",
        "phoneId": "{{phoneNumberId}}",	
        "phoneNumber": "{{phone Number}}".
        “mbPhoneId”: “{{mbPhoneId}}”
    },
     "securityArguments": {
        "oauth": {
      "accessToken": "{{long-lived-access-token}}"
        }
    }
}'

Await channel creation webhook

Once you have submitted your connector request a channel will be created in the background and once this has been created you will receive a callback based on the webhook you setup earlier.

Take note of the connector id and channel id. You will use the connector id to manage the integration with Meta and the channel id to send messages to the Bird CRM API.

Subscribe to channel webhooks

Last updated