LogoLogo
No-code docsResources
  • 🖥️Welcome to the Bird API Docs
  • API Access
    • Access Policies
    • Access Roles
    • API Authorization
    • Common API usage
  • Conversations API
    • API reference
      • Channel configuration
        • Get conversations configuration
        • Update conversations configuration
      • Conversations messaging
        • Create conversation message
        • List conversation messages
        • Get conversation message
        • Update conversation message
        • Delete conversation message
        • Create pre-signed upload
      • Conversations management
        • Create conversation
        • List conversations
        • Get conversation
        • Update conversation
        • Delete conversation
      • Conversation Participants
        • Add participant to conversation
        • List participants
        • Get participant by ID
        • Get participant by identifier key and value
        • Update participant by ID
        • Update participant by identifier key and value
        • Delete participant
        • List participant conversations by ID
        • List participant conversations by identifier key and value
      • Workspace settings
        • Get antispam setting
        • Update antispam setting
        • Create allow/block rule
        • Get allow/block rule
        • List allow/block rules
        • Update allow/block rule
        • Delete allow/block rule
        • Add allow/block rules in bulk
        • Get allow/block bulk upload status
      • Events
  • Collaborations API
    • API reference
      • Agent Management
      • Team Management
      • Feeds
      • Feed item activity
      • Tags
      • Automation Rules
      • Business Hours
      • Capacity Rules
      • Routing Queues
      • Skills
      • SLA Policies
      • Macros
      • Sender Profiles
      • Ticket fields
  • Channels API
    • Supported channels
      • Programmable WhatsApp
        • Sending WhatsApp messages
        • Customer service window
        • Receiving messages
        • Message interactions
        • WhatsApp ISV integration
          • Setting up your customer workspaces
            • API Access
            • Associating your Facebook solution ID and business ID with your Bird CRM Organization
            • Creating a workspace for your customer
            • Buying a number through Bird
            • Subscribing to channel created webhooks
          • WhatsApp channel onboarding
            • Setting up the WhatsApp Embedded flow
            • Install WhatsApp phone number in Bird CRM
            • Subscribe to channel webhooks
      • Programmable SMS
        • Installing an SMS channel
          • US 10DLC API Installation
          • Toll-Free Numbers Verification API
        • Sending SMS messages
        • Receiving messages
        • Twilio Exit API
          • Using Twilio PHP SDK
          • Using Twilio Go SDK
          • Using Twilio Ruby SDK
        • Sinch Exit API
      • Programmable RCS
        • Sending messages
        • Receiving messages
        • Message interactions
      • Programmable Email
        • Sending Emails
        • Receiving messages
        • Message status
        • Message interactions
      • Programmable Line
        • Sending messages
        • Receiving messages
        • Message interactions
      • Programmable Telegram
        • Sending messages
        • Receiving messages
        • Message interactions
    • Message types
      • Text
      • Images
      • Files
      • List
      • Carousel
      • Template
    • Message status and interactions
      • Message Failure Codes
      • Message Failure Sources
        • SMS Platform Extended Error Codes
    • Send batch messages
    • API reference
      • Channel Groups
      • Messaging
      • Channels management
      • Channel connectors
      • Navigators
      • Compliance Keywords Messages
      • Conversions Sharing
      • Events
    • Rate Limit
  • Voice API
    • Installing a Voice channel
    • Voice Calls API
      • Initiate an outbound call
      • List calls from a channel
      • Get a call
      • Update a call
      • Answer a call
      • Ring a call
      • Hangup a call
      • Play a message in a call
      • Say Text-To-Speech (TTS)
      • Gather DTMF from a call
      • Forward a call
      • Record a Call
      • Record a call session
      • Update a call recording
      • List call recordings of a call
      • Get a call recording
      • Get a call insights
      • Get calls log
    • Recordings API
      • List Recordings
      • Get a Recording
      • Delete a Recording
      • List recording storage metrics
    • Transcriptions API
      • Initiate a Transcription
      • List Transcriptions
      • Get a Transcription
      • Delete a Transcription
    • Voice webhooks
    • Flash Calling API
  • Verify API
    • Verify API: Quick Start
  • Contacts API
    • Tracking Contact Events
      • API Reference
        • Get configuration
        • Track events
    • API reference
      • Manage workspace contacts
        • Create a contact
        • Get a contact
        • List contacts
        • Search contact by identifier
        • Update a contact
        • Create or update a contact by identifier
        • Delete a contact
      • Manage contact identifiers
        • Create contact identifier
        • List contact identifiers
        • Delete contact identifier
      • Manage contact attribute definition
        • Create attribute definition
        • Get attribute definition
        • List attribute definitions
      • Manage contact lists
        • Create a list
        • Get a list
        • List lists
        • Update a list
        • Delete a list
        • Add contacts to a list
        • Get contact list memberships
        • List contacts in a list
        • Remove contacts from a list
      • Lookup
        • Network/Country information for a phone number
  • Numbers API
    • API reference
      • Search Available Numbers
      • Buy a Number
      • List your Numbers
      • Get Long Code Number Details
      • Manage Endpoint Subscriptions
        • Cancel Number Subscription
      • Manage Endpoint Compliance Requirements
        • List Workspace compliace Requirements
        • Get Workspace Compliace Requirements
        • Update Workspace Compliace Requirements
      • 10DLC Compliance
        • Brands - Organization
          • Create a brand
          • List all brands
          • Get a brand
          • Update a brand
          • Delete a brand
          • Create a brand vetting
        • Brands - workspace
          • Create a brand
          • List all brands
          • Get a brand
          • Update a brand
          • Delete a brand
          • Create a brand vetting
          • List brand vettings
        • Campaigns
          • Optional: acting as Reseller
          • Create a campaign
          • List all campaigns
          • Get a campaign
          • Update a campaign
          • Delete a campaign
        • TCR Enums
        • Events
      • Toll-Free Numbers Verification API
      • Long Code Numbers
      • Short Code Numbers
      • Alphanumeric Senders
      • Events
  • Know-Your-Customer (KYC) API
    • List KYC forms
    • Get KYC form
    • Create KYC form entry
    • Update KYC form entry
    • List KYC form entries
    • Get a KYC form entry details
  • Reporting API
    • API reference
      • Channel Metrics
      • Flow Run Metrics
      • Wallet Metrics
      • Campaign Metrics
      • Message Metrics
  • Accounts API
    • API reference
      • Current user
        • Change password
        • Presigned upload
        • Memberships
        • Sessions
        • Configurations
          • Groups
            • Keys
      • IAM policies
      • Organizations
        • Upload media
        • Profile
        • Workspaces
        • Users
        • Access keys
        • Organization roles
        • Organization policies
        • Teams
          • Members
        • Approvals
          • Runs
            • Reviews
        • Configurations
          • Groups
            • Keys
      • Region groups
  • Touchpoints API
    • Supported Projects
      • Whatsapp Approved Message Templates
        • Creating WhatsApp Message templates
          • Text template blocks
          • Blocks Documentation
    • API reference
      • Projects
      • Message Templates
  • Notifications API
    • API Reference
      • Webhook subscriptions
        • Create a webhook subscription
        • List available webhook events
        • Get a webhook subscription
        • List webhook subscriptions
        • Update a webhook subscription
        • Delete a webhook subscription
        • Verifying a webhook subscription
        • Webhook subscription logs
  • Knowledge Base (KB) API
    • API reference
      • Documents
      • Folders
        • Import
      • Search
      • Presigned upload
  • Email API
    • Transmissions
  • Connectivity platform migration guide
    • Channels API and Conversations API
    • Migrating conversations API actions
    • Migrating WhatsApp channels
  • Client SDKs
    • Applications
    • Contact Profiles
      • Signed Identity
    • Push notifications
      • Quick Start
      • Subscribe contacts to push notification campaigns
      • Notification Display Priority
    • Event Tracking
      • Quick Start
      • Track Events
        • App
        • Audiences
        • Conference
        • Ecommerce
        • Hospitality
        • Lists
        • Messaging
        • Payments
        • Subscription
        • Suppressions
        • Survey
        • Web
    • App Inbox
      • Quick Start
      • Usage
      • Subscribe contacts to app inbox campaigns
    • SDK Integration
      • Android SDK
        • Notification Interactions
      • Swift SDK
        • Notification Interactions
      • Web SDK
        • Quick Start
        • Usage
        • API Reference
          • IdentityManager
          • BirdSdkApi
          • BirdTracker
            • Ecommerce
            • Conference
            • Messaging
            • Suppressions
            • Subscription
            • Survey
            • Web
            • Audiences
        • Web Push Notifications
          • Notification Interactions
  • Quickstarts
    • Conversations
    • Send an SMS message
    • Send an Email message
    • Send a WhatsApp message
Powered by GitBook
On this page

Was this helpful?

  1. Channels API
  2. Supported channels
  3. Programmable WhatsApp
  4. WhatsApp ISV integration
  5. WhatsApp channel onboarding

Setting up the WhatsApp Embedded flow

Last updated 7 months ago

Was this helpful?

To onboard your customers onto WhatsApp, you will need to integrate the WhatsApp embedded flow into your own platform. This enables your customers to share permissions for you and Bird to manage their WhatsApp business account and send messages on their behalf. Customers share permissions by logging in through the embedded signup flow.

Setting up the embedded flow

See the following from Meta on how to complete this. When embedding the signup flow, there are two important extra data fields (as shown in the extras.setup object below) that must be set correctly:

  1. Solution_Id: This should be set to the solutionId obtained after you . This ensures that your end customer is onboarded for both your business and allows Bird to send messages on behalf of this customer

  2. Preverified_Id: If you’ve for your customer, it will already be pre-verified (authenticated) for WhatsApp. Including the preverified_id when launching the signup flow enables the customer to onboard without needing to receive an OTP code for the number. See the instructions below on how to obtain the

<script type="text/javascript">
  document.getElementById('login-btn').onclick = () =>
    FB.login(response => {}, {
      config_id: '{{config_id}}', 
      response_type: 'code',    
      override_default_response_type: true, 
      extras: {
        setup: {
          solutionID: {{solution_id}}
          preVerifiedPhone: {
            ids: ['{{preverified Id}}']
          },...
        }
      }
    });
</script>

Apply for advanced access to Meta public_profile

For the embedded signup to work, you must apply for advanced access to the public_profile permission on your Meta app. In the Meta for developers app dashboard, navigate to your App Review > Permissions and features are ensure you have advanced access as shown

Getting pre-verified number ID (optional)

If you have purchased a number for your customer through Bird CRM, this should be automatically pre-verified for use on WhatsApp. This typically takes around 5 minutes from completing the number purchase. To list the numbers in your workspace you can list them as follows

To get the pre-verified number ID check the number.whatsApp object as follows. You should make use of the whatsAppId.In addition before starting the embedded flow ensure that:

  1. status: verified

  2. stage: final

  3. verificationExpiresAt is after now

"whatsApp": {
        "whatsAppId": "7734737979921234",
        "status": "verified",
        "stage": "final",
        "attempt": 0,
        "nextAttemptAt": "0001-01-01T00:00:00Z",
        "requestedCodeAt": "2024-05-22T22:22:11.351Z",
        "verificationExpiresAt": "2024-08-20T22:22:58Z",
        "createdAt": "2024-05-22T22:21:51.099Z",
        "updatedAt": "2024-05-22T22:24:09.555Z"
    }

The below is the example response when getting your Bird number

{
    "type": "local",
    "country": "US",
    "number": "+1234567890",
    "capabilities": {
        "voice": {
            "inbound": true,
            "outbound": true
        },
        "sms": {
            "inbound": true,
            "outbound": true
        },
        "mms": {
            "inbound": true,
            "outbound": true
        },
        "fax": {
            "inbound": false,
            "outbound": false
        }
    },
    "monthlyRecurringPrice": {
        "currencyCode": "EUR",
        "amount": 110000,
        "exponent": -6
    },
    "complianceRequirements": [
        {
            "name": "kyc:origin",
            "scope": "number-activation",
            "type": "kycForm",
            "selector": {
                "scope": "number",
                "countryCode": "US",
                "numberType": "local"
            }
        },
        {
            "name": "usecase:sms",
            "scope": "sms-outbound",
            "type": "useCase",
            "selector": {
                "platform": "sms-messagebird",
                "countryCode": "US",
                "numberType": "local"
            }
        },
        {
            "name": "whatsapp:verification",
            "scope": "whatsapp",
            "type": "whatsappVerification",
            "inventoryId": "00000000-0000-46b1-a954-961702a4c88f"
        }
    ],
    "id": "00000000-0000-46b1-a954-961702a4c88f",
    "workspaceId": "00000000-0000-46b1-a954-961702a4c88f",
    "status": "active",
    "configurations": {},
    "createdAt": "2024-05-22T22:21:51.049Z",
    "updatedAt": "2024-05-22T22:21:51.049Z",
    "activatedAt": "2024-05-22T22:21:51.049Z",
    "deactivatedAt": null,
    "deactivatesAt": null,
    "subscription": {
        "status": "active",
        "subscribedAt": "2024-05-01T00:00:00Z",
        "updatedAt": "2024-05-01T00:00:00Z",
        "cancelledAt": "0001-01-01T00:00:00Z"
    },
    "endpointSubscription": {
        "id": "00000000-0000-46b1-a954-961702a4c88f",
        "correlationId": "00000000-0000-46b1-a954-961702a4c88f",
        "status": "active",
        "subscribedAt": "2024-05-01T00:00:00Z",
        "updatedAt": "2024-05-01T00:00:00Z"
    },
    "requirements": [
        {
            "requirement": {
                "name": "kyc:origin",
                "scope": "number-activation",
                "type": "kycForm",
                "selector": {
                    "scope": "number",
                    "countryCode": "US",
                    "numberType": "local"
                }
            },
            "status": "ok",
            "reference": null
        },
        {
            "requirement": {
                "name": "usecase:sms",
                "scope": "sms-outbound",
                "type": "useCase",
                "selector": {
                    "platform": "sms-messagebird",
                    "countryCode": "US",
                    "numberType": "local"
                }
            },
            "status": "no-reference",
            "reference": null,
            "notOkSince": "2024-05-22T22:21:51.095Z"
        },
        {
            "requirement": {
                "name": "whatsapp:verification",
                "scope": "whatsapp",
                "type": "whatsappVerification",
                "inventoryId": "00000000-0000-46b1-a954-961702a4c88f"
            },
            "status": "ok",
            "reference": "7734737979921234"
        }
    ],
    "whatsApp": {
        "whatsAppId": "7734737979921234",
        "status": "verified",
        "stage": "final",
        "attempt": 0,
        "nextAttemptAt": "0001-01-01T00:00:00Z",
        "requestedCodeAt": "2024-05-22T22:22:11.351Z",
        "verificationExpiresAt": "2024-08-20T22:22:58Z",
        "createdAt": "2024-05-22T22:21:51.099Z",
        "updatedAt": "2024-05-22T22:24:09.555Z"
    },
    "endpoint": {
        "id": "00000000-0000-46b1-a954-961702a4c88f",
        "type": "long-code-number",
        "instanceId": "00000000-0000-46b1-a954-961702a4c88f",
        "name": "+1234567890",
        "provisioningStatus": "provisioned",
        "createdAt": "2024-05-22T22:21:51.049Z",
        "updatedAt": "2024-05-23T10:47:12.325Z",
        "capabilities": [
            {
                "name": "voice",
                "inbound": {
                    "status": "active"
                },
                "outbound": {
                    "status": "active",
                    "destinationStatuses": {
                        "active": 1,
                        "available": 185
                    },
                    "supportsDestinations": true
                }
            },
            {
                "name": "sms",
                "inbound": {
                    "status": "active"
                },
                "outbound": {
                    "status": "active",
                    "destinationStatuses": {
                        "active": 1,
                        "available": 185
                    },
                    "supportsDestinations": true
                }
            },
            {
                "name": "mms",
                "inbound": {
                    "status": "active"
                },
                "outbound": {
                    "status": "active",
                    "destinationStatuses": {
                        "active": 1,
                        "available": 1
                    },
                    "supportsDestinations": true
                }
            },
            {
                "name": "whatsapp",
                "inbound": {
                    "status": "active"
                },
                "outbound": {
                    "status": "unavailable",
                    "supportsDestinations": false
                }
            }
        ]
    }
}

Embedded signup completion

{
  data: {
    phone_number_id: "<PHONE-ID>",
    waba_id: "<WABA-ID>",
  },
  type: "WA_EMBEDDED_SIGNUP",
  event: "FINISH",
  version: 2
}
{
  "authResponse": {
    "userID": null,
    "expiresIn": null,
    "code": "<CODE_TO_BE_EXCHANGED>"
  },
  "status": "connected"
}

Exchange debug token for long lived token

Once the embedded signup has been completed and you have the phone_number_id, waba_id, and code you should submit this to an api endpoint e.g. <somedomain>/installwhatsapp. In addition if you are using a number bought via Bird then you should also include the unique id of the number

GET https://graph.facebook.com/v20.0/oauth/access_token?
  client_id=<APP_ID>
  &client_secret=<APP_SECRET>
  &code=<CODE>

You should securely associate the long lived token and WABA ID with the customer account in your platform.

You should also implement to get the phone_number_id and waba_id after the user completes the embedded signup.

Once your customer has completed the embedded signup, you should collect the phone_number_id and waba_id from the object

In addition you should get an object which will contain a token which will be exchanged for a long lived access token

From this API you can then you have a long lived access token. You should use the Meta App_ID and App_Secret from the app you created earlier.

session logging
sessionInfo
authResponse
exchange the code
Install WhatsApp phone number in Bird CRM
guide
connected to Bird as a solutions provider
obtained a number from Bird
pre-verified Id.

Get Number

get

Retrieve a specific number details by its ID. This number is part of the workspace purchased number inventory.

Authorizations
Path parameters
workspaceIdstring · uuidRequired

The ID for the workspace.

Example: d386a801-ee8d-4aba-a7e4-78671bd3b11e
numberIdstringRequired

The number/endpoint ID.

Example: e40ce70f-e7e0-45c0-9d64-2fc7d0401a16
Responses
200
OK
application/json
404
Number or workspace not found
application/json
422
Invalid Status filter
application/json
get
GET /workspaces/{workspaceId}/numbers/{numberId} HTTP/1.1
Host: 
Authorization: Bearer jwt
Accept: */*
{
  "type": "local",
  "capabilities": {
    "sms": {
      "inbound": true,
      "outbound": true
    },
    "voice": {
      "inbound": true,
      "outbound": true
    },
    "mms": {
      "inbound": true,
      "outbound": true
    },
    "fax": {
      "inbound": true,
      "outbound": true
    }
  },
  "number": "+14155552671",
  "country": "text",
  "monthlyRecurringPrice": {
    "currencyCode": "EUR",
    "amount": 3500000,
    "exponent": -6
  },
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "active",
  "subscription": {
    "status": "active",
    "subscribedAt": "2025-05-12T21:22:27.817Z",
    "updatedAt": "2025-05-12T21:22:27.817Z",
    "cancelledAt": "2025-05-12T21:22:27.817Z"
  },
  "endpointSubscription": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "correlationId": "123e4567-e89b-12d3-a456-426614174000",
    "status": "active",
    "subscribedAt": "2025-05-12T21:22:27.817Z",
    "updatedAt": "2025-05-12T21:22:27.817Z",
    "canceledAt": "2025-05-12T21:22:27.817Z",
    "startAt": "2025-05-12T21:22:27.817Z",
    "endAt": "2025-05-12T21:22:27.817Z"
  },
  "configurations": {
    "voice": {
      "inbound": {
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text"
      },
      "outbound": {
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text"
      }
    },
    "sms": {
      "inbound": {
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text"
      },
      "outbound": {
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text"
      }
    },
    "mms": {
      "inbound": {
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text"
      },
      "outbound": {
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text"
      }
    },
    "fax": {
      "inbound": {
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text"
      },
      "outbound": {
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text"
      }
    },
    "whatsapp": {
      "connectorId": "123e4567-e89b-12d3-a456-426614174000",
      "connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000",
      "connectorTemplateRef": "text"
    }
  },
  "createdAt": "2025-05-12T21:22:27.817Z",
  "updatedAt": "2025-05-12T21:22:27.817Z",
  "activatedAt": "2025-05-12T21:22:27.817Z",
  "deactivatedAt": "2025-05-12T21:22:27.817Z",
  "deactivatesAt": "2025-05-12T21:22:27.817Z",
  "requirements": [
    {
      "requirement": {
        "name": "text",
        "type": "kycForm",
        "scope": "number-activation",
        "selector": {
          "scope": "text",
          "numberType": "local",
          "countryCode": "US"
        }
      },
      "status": "ok",
      "reference": "text",
      "notOkSince": "2025-05-12T21:22:27.817Z"
    }
  ],
  "endpoint": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "type": "long-code-number",
    "instanceId": "1551f382-6870-4480-8f9b-f5ab34936288",
    "name": "+14155552671",
    "capabilities": [
      {
        "name": "sms",
        "inbound": {
          "status": "active",
          "issues": [
            "subscription-is-not-active"
          ]
        },
        "outbound": {
          "status": "active",
          "destinationStatuses": {
            "active": 1,
            "inactive": 1,
            "available": 1,
            "unavailable": 1
          },
          "supportsDestinations": true,
          "issues": [
            "subscription-is-not-active"
          ]
        }
      }
    ],
    "dependencies": [
      {
        "type": "connector",
        "connectorId": "123e4567-e89b-12d3-a456-426614174000",
        "connectorTemplateRef": "text",
        "capabilities": [
          "voice"
        ]
      }
    ],
    "issues": [
      "subscription-is-not-active"
    ],
    "provisioningStatus": "provisioned",
    "createdAt": "2025-05-12T21:22:27.817Z",
    "updatedAt": "2025-05-12T21:22:27.817Z"
  },
  "whatsApp": {
    "whatsAppId": "text",
    "status": "verified",
    "stage": "text",
    "attempt": 1,
    "nextAttemptAt": "2025-05-12T21:22:27.817Z",
    "verificationExpiresAt": "2025-05-12T21:22:27.817Z",
    "requestedCodeAt": "2025-05-12T21:22:27.817Z",
    "createdAt": "2025-05-12T21:22:27.817Z",
    "updatedAt": "2025-05-12T21:22:27.817Z"
  }
}
  • Setting up the embedded flow
  • Apply for advanced access to Meta public_profile
  • Getting pre-verified number ID (optional)
  • GETGet Number
  • Embedded signup completion
  • Exchange debug token for long lived token