🌐
Recrubo API
  • Getting Started
    • Introduction
    • Sandbox
    • Async requests
    • Authentication
    • Webhooks
    • Filtering, sorting, pagination and including resources
  • Guides
    • Setting up webhooks
    • Generating flows
    • Editing flows
    • Triggering flows
    • Embedding the Inbox
    • Sending messages
  • Resources
    • API Resource Reference
      • Candidate
      • Conversation
      • Flow
      • FlowRun
      • FlowGeneration
      • Message
      • MessageTemplate
      • MessageThread
      • NodeAction
      • NodeTransition
      • Node
      • VacancyAnalysis
      • Vacancy
      • User
      • WebhookPayload
    • Embeddables
      • Inbox
      • BotStudio
      • GenerateFlow
      • Whatsapp connect button
      • Schedule Form
      • Schedule Table
    • Flow types
      • vacancy_application_flow
  • Management
    • Organizations
Powered by GitBook
On this page
  • Parameters
  • Actions
  • Configuration Settings
  • Initialize
  1. Resources
  2. Embeddables

Whatsapp connect button

PreviousGenerateFlowNextSchedule Form

Last updated 1 year ago

The WhatsApp Connect Button enables connecting a WhatsApp account for enhanced Recrubo functionality. An organization can only have one WhatsApp account connected at a time. This connection allows the WhatsApp account to:

  • Chat via WhatsApp using the Inbox.

  • Send messages via the API.

  • Receive messages via the API

Parameters

Parameter
Type
Description
Required

action

String

Will be initialize as this component does not have other actions.

Yes

token

String

Authentication token to authorize the component.

Yes

settings

Object

No

Actions

Action
Description
Arguments
Settings

initialize

Initializes the component.

Configuration Settings

Setting
Type
Description
Default

allowDisconnect

boolean

The allowDisconnect boolean allows you to disable the option to disconnect a WhatsApp account to prevent users from accidentally disconnecting.

true

Initialize

To load the Whatsapp Connect Button in to your application, you need to embed the component's iframe in your HTML. The iframe's src attribute should be set to https://api.recrubo.app/public/v2/embed/component/whatsapp-connect.

Example

<iframe id="whatsappConnectFrame" src="https://api.recrubo.app/public/v2/embed/component/whatsapp-connect" class="w-full h-full"></iframe>

<script type="text/javascript">
const whatsappConnect = document.querySelector('#whatsappConnectFrame')

whatsappConnect.onload = (evt) => {
    const whatsappConnectSettings = {
        action: 'initialize',
        token: 'XX-XX-XX-XX',
        settings: {
            whatsappConnect: {
                allowDisconnect: true
            }
        }
    }

    whatsappConnect.contentWindow.postMessage(whatsappConnectSettings, 'https://recrubo.app')
}
</script>

JSON object containing configuration for the Inbox component.

settings JSON object of new .

settings
configuration settings
The two button states