Webhook

Enhance communication and automation with Gallabox's Webhook feature. Easily set up data and event notifications by configuring the URL, secret token, HTTP headers, & selecting specific events.

Gallabox offers a Webhook feature that allows you to set up real-time integration with external systems or services. This feature enables you to send data and notifications from Gallabox to other platforms, ensuring seamless communication and automation. Here is the key components in Webhook configuration:

  1. Request URL: The Request URL is the endpoint where Gallabox sends data and events. This is typically an external system or service that can receive HTTP requests. You specify the URL of the receiving system here.

Add New Webhook

Go to Settings in the left navigation panel and select Webhook. Click on + Add new.

Add Details of Webhook

Add the Request URL, secret, headers, and select the events.

FieldDescription

Request URL*

Enter the URL where the webhook notifications will be sent.

Optionally, enter a secret token for added security.

Headers

Optionally, customize HTTP headers for the webhook request.

Select Events*

Choose from a variety of events for which notifications will be triggered.

Webhook Events

Users can select from the following categories of events:

Contact

EventDescrition

Contact.created

Triggered when a new contact is created.

Contact.updated

Triggered when an existing contact is updated.

Contact.mapped

Triggered when a contact is mapped to another entity.

Contact.unmapped

Triggered when a contact is unmapped from an entity.

Conversation

EventDescription

Conversation.created

Triggered when a new conversation is initiated.

Conversation.updated

Triggered when an existing conversation is updated.

Conversation.UnAttended

Triggered when an existing conversation is unattended.

Conversation.Tag.mapped

Triggered when a tag is mapped to a conversation.

Conversation.Tag.unmapped

Triggered when a tag is unmapped from a conversation.

Message

EventDescription

Message.received

Triggered when a new message is received.

Message.flow.received

Triggered when a message flow is received.

Message.WA.Cart.received

Triggered when a cart message is received on WhatsApp

Message.WA.status.received

Triggered when the status of a WhatsApp message is received.

Message.WA.status.failed

Triggered when a WhatsApp message fails to send.

Message.WA.Payment.status.received

Triggered when the status of a payment message sent via WhatsApp is received.

Template

EventDescription

Template.status

Triggered when the status of a message template changes.

Webhook Logs

Webhook Logs provide detailed information about webhook events, their status, and associated data. Here's what you can find in the Webhook Logs in Gallabox:

FieldDescription

Webhook Log ID

This is a unique identifier for each webhook log entry, enabling easy reference and tracking of webhook activities.

Event

The "Event" column specifies the type of event that triggered the webhook. For example, "Conversation Update" or "Message Received."

Created At

This timestamp indicates when the webhook event occurred, offering a chronological view of webhook activities.

Status

The "Status" field represents the current state of the webhook event. In this context, "Failed" indicates that the webhook event was not successful.

Payload

The "Payload" refers to the data associated with the webhook event. It includes the content or information transferred from Gallabox to the external system or service via the webhook.

Verifying requests from Gallabox

Gallabox secures its requests with a unique secret (configured by you) specific to webhooks. Using the webhook secrets, your app can more reliably confirm the authenticity of Gallabox requests.

Validating a Request

To verify the requests, follow these steps:

  1. Retrieve the signature: Extract the signature from the x-gallabox-signature header in the incoming HTTP request.

  2. Create a hash: Generate an HMAC SHA-256 hash using your webhook secret and the request payload.

  3. Compare with the signature: Compare the generated hash with the signature from the HTTP header.

If the hash and the signature match, the request is verified as originating from Gallabox and can be processed. If not, the request should be rejected.

For enhanced security, keep the secrets confidential and update regularly.

Last updated