Handling SMS Messages

Learn how to build scalable Messaging applications using the Elarian customer engagement framework.

Sending

const customer = new client.Customer({
    number: 'YOUR-CUSTOMERS-PHONE-NUMBER',
    provider: 'cellular'
});

const resp = await customer.sendMessage(
  {
    number: 'YOUR-ALPHANUMERIC or YOUR-SHORTCODE',
    channel: 'sms'
  },
  {
    body: {
      text: 'Hello World!'
    }
  }
);

Receiving

client.on('receivedSms', (notification, customer, appData, callback) => {
  console.log(notification);
});