How to send a whatsapp message through twilio via zapier webhook

Currently trying to create a Whatsapp message to be sent via This custom Javascript code on Zapier shown via Twilio API. It successfully reaches out to twilio but returns “Authentication Error – No credentials provided”.

var messagesUrl = "<accountSID>/Messages.json";
var payload = {
 "To": "whatsapp:<tonumber>",
 "Body" : "Hey This is a test",
  "From" : "whatsapp:<fromnumber>"
 var options = {
 "method" : "post",
 "payload" : payload

options.headers = {
 "Authorization" : "Basic <accountsid>:<accounttoken>"
fetch(messagesUrl, {options, body: JSON.stringify(payload)})
 .then(function(binaryResponse) {
  return binaryResponse.json();
  callback(null, {result: jsonResponse});

What is the best approach to take to simply send a confirmation text on whatsapp to prospects on zapier? Thanks in advance


Thank you for your help, i ended up solving this by using a much simpler Custom web hook POST method, i was over-complicating it. Details on how i did this for anybody else wanting to send whats-app messages through Twilio on Zapier Below:





To=whatsapp:%2B<toNumber>&From=whatsapp:%2B<fromNumber>&Body=Put your message body here

Note: The + of your E.164 number will concatenate hence the %2B to replace it

Basic Auth



Content-Type | application/x-www-form-urlencoded

Leave a Reply

Your email address will not be published. Required fields are marked *