Skip to main content
SMS Notifications integration is possible using Twilio as a provider or a custom provider. With Custom SMS provider, you can integrate using SMS providers other than Twilio.

Twilio

We have partnered with Twilio for sending SMS Notifications so need to set up an account on Twilio before you start using the extension.

Sign up and get a phone number

  1. Sign up for Twilio. When prompted to select a plan, click Continue with trial.
  2. Get a phone number with SMS capability:
    • In the account dashboard, click Get a phone number, or
    • Go to Phone Numbers > Manage > Buy a number.
  3. From the dashboard, copy your Account SID and Auth Token for later use.
  4. Make a note of the sender phone number for later use.

Store contact details

Store the phone number of your users by using our Update Contact details API.

Enable SMS Notifications

  1. Login to CometChat dashboard and select your app.
  2. Navigate to Notifications > Settings in the left-hand menu.
  3. Enable SMS notifications feature.

Save Twilio credentials

Save the following details:
  • Twilio Account SID
  • Twilio Auth token
  • Twilio sender phone number

Save user’s timezone

A user’s timezone is required to allow them to set a schedule for receiving notifications. In case the timezone is not registered, the default timezone for
  • For US region: EST
  • For EU region: GMT
  • For IN region: Asia/Kolkata
The timezone can be registered for a user from the SDK using the updateTimezone() method of CometChatNotifications class.
This functionality is available in the following SDK versions:
  1. Android SDK version 4.0.9 and above
  2. iOS SDK version 4.0.51 and above
  3. Web SDK version 4.0.8 and above
  4. React Native SDK version 4.0.10 and above
  5. Ionic Cordova SDK version 4.0.8 and above
  6. Flutter SDK version 4.0.15 and above

Receive notifications

Send a message to any user and keep the conversation unread for the designated amount of time to receive an SMS notification.