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.
POST
/workspaces/{workspaceId}/connectors
Create a new connector from a template.
Anfrage-Payload
name
string
erforderlich
connectorTemplateRef
string
arguments
object
For SMS connectors (sms-messagebird:1), channelMessageType is required and must be one of promotional, transactional, conversational, emergency, 2fa.
securityArguments
object
Provide the arguments required by the security scheme(s) on the connector template.
channelConversationalStatusEnabled
boolean
invitationToken
string
Antwort-Payload
id
string
erforderlich
The ID of this connector.
workspaceId
string
The ID of the workspace this connector belongs to.
routingKey
string
name
string
erforderlich
The Name of this connector.
region
string
The Region in which this connector was installed in.
description
string
The Description of this connector.
arguments
object
Pre-configured arguments for this connector.
channel
object
Untergeordnete Attribute anzeigen
channel.channelId
string
erforderlich
channel.platform
string
erforderlich
number
object
Untergeordnete Attribute anzeigen
number.profileId
string
erforderlich
number.numberId
string
erforderlich
number.phoneNumber
string
number.variables
object
number.capabilities
string
Capabilities of a number. That would be represented with joined string of capabilities with comma.
number.numberType
string
Type of the number; could be mobile, tollfree, local, etc.
number.endpointType
string
Type of the endpoint; could be long-code-number, short-code-number, alpha-number, etc.
number.country
string
Country code of the number.
number.profileAttachments
array of object
Untergeordnete Attribute anzeigen
number.profileAttachments.capability
string
number.profileAttachments.profileId
string
number.profileAttachments.variables
object
Untergeordnete Attribute anzeigen
number.profileAttachments.variables.connectorId
string
connectorTemplateSlug
string
The slug for the template this connector is based on.
connectorTemplateRef
string
The ref for the template this connector is based on.
dataFetching
object
Untergeordnete Attribute anzeigen
dataFetching.schedule
string
dataFetching.streams
array of object
Untergeordnete Attribute anzeigen
dataFetching.streams.eventName
string
dataFetching.streams.streamName
string
dataFetching.streams.eventStreamName
string
dataFetching.streams.filter
string
dataFetching.streams.initialState
string
dataFetching.streams.endCondition
string
dataFetching.streams.incremental
boolean
dataFetching.streams.duplicatesFilterCapacity
number
dataFetching.streams.cursorField
string
dataCapture
object
Untergeordnete Attribute anzeigen
dataCapture.captureEndpoint
string
createdAt
string
erforderlich
When the connector was created.
updatedAt
string
When the connector was last updated.
Codebeispiel
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/connectors' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'The required 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 -
- The phone number in E.164 format (e.g., +18668044658) or with formatting (e.g., +1 866-804-4658) — we normalize automatically.
- If using a Bird-provided number, use the number you acquired.
- If the customer is bringing their own number, either collect it from them directly or resolve it from the phone_number_id via the Meta Graph API: GET https://graph.facebook.com/v25.0/{phone_number_id}?fields=display_phone_number.
- mbPhoneId - the ID of the Bird phone number (Required only if using a Bird number)
- accessToken - Use the Business Integration System User Access Token exchanged during the Embedded Signup flow here - not a manually-created System User Access Token. Ensure your app has advanced access to whatsapp_business_management permission. See Meta's token documentation.
Codebeispiel
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}}"
}
}
}'The required 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 (Required only if using a Bird number)
- accessToken - the access token you exchanged in the here
In addition you can also set the following optional properties
- phoneRegistrationPin - Provide your own 6 digit PIN (instead of one we generate)
- dataLocalizationRegion - Set the country where Meta will store data at rest for the channel. Must be a valid ISO 3166 code (as follows) - AU,ID,IN,JP,SG,KR,DE,CH,GB,BR,BH,ZA,AE,CA
Codebeispiel
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}}”,
"phoneRegistrationPin": {{phoneRegistrationPin}},
"dataLocalizationRegion": {{dataLocalizationRegion}}
},
"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.