Skip to main content
Use a custom provider to send CometChat SMS notifications through any gateway via webhook. Twilio is built-in; choose custom when you want another SMS service or your own bridge.

Prerequisites

  1. Public https:// webhook that accepts POST JSON.
  2. Return 200 OK within ~2 seconds (do heavy work async).
  3. Secure the endpoint (recommended): Basic Auth or a verified signature. With Basic Auth, requests include:

Add credentials

  1. Click on the ”+ Add Credentials” button.
  2. Enable the provider.
  3. Enter the publicly accessible webhook URL.
  4. (Recommended) Enable Basic Authentication and set username/password.
  5. Decide if you want to Trigger only if phone number is stored with CometChat (via Update Contact details API); when off, the webhook fires regardless.
  6. Save the credentials.

How delivery works

The Custom provider is triggered once for an event in one-on-one conversation. In case of notifying users in a group, the custom provider is triggered once for each user present in that group.

Sample server-side code