Kevin Hussey
Kevin Hussey

Reputation: 1712

Rich notification with Twilio notify

I am using twilio to bulk notify (push) customers when we have outages etc, and that works well at the moment. However we are looking to embed some images in certain notifications. Just wondering if this is possible?

Upvotes: 0

Views: 118

Answers (1)

Alan
Alan

Reputation: 10781

You can attach media for SMS (MMS). I have never seen a push directly include media.

notification = service.notifications
  .create({
    toBinding: bindings,
    sms: {
      body: body,
      media_urls: [
        "http://thecatapi.com/api/images/get.php?api_key=MTAx&id=da1"
      ]
    }
  })
  .then(() => {
    console.log(notification);
  })
  .catch(err => {
    console.error(err);
  });

Upvotes: 1

Related Questions