How to implement typing indicator in WhatsApp when using npm twilio package

Viewed 1005

I am implementing twilio/whatsapp webhook in order to process messages sent to twilio whatsapp-enabled number. The implementation is done in Node.JS using npm twilio library. I am sending response syncrhonously (as response to webook request) utilizing twilio.twiml.MessagingResponse interface. When message is sent to webhook we call NLP for processing and then forward response from NLP back to webhook as twilio.twiml.MessagingResponse. Normally NLP processing takes couple of seconds and I would like to implement typing indicator somehow in order to improve user experience. Can you advise how to do it using npm twilio library (https://www.twilio.com/docs/libraries/node)?

thanks

1 Answers

Twilio developer evangelist here.

There is not a way to set the typing indicator in WhatsApp via the Twilio API for WhatsApp. That is not a limitation of Twilio though. Instead, I have checked through the WhatsApp API documentation and I haven't found any documentation on setting the typing indicator in the API. So, it looks like this is not currently possible.

Related