TWILIO Basic Authentication header

Hi, Iโ€™m having a problem when trying to send whatsapp notifications using TWILIO. Iโ€™m getting the following error:

Workflow rule โ€˜whatsappโ€™ field โ€˜Webhookโ€™ expression โ€˜Basic QUM5NTM5YzlhOTU3ZTdjYjZjZjdhZjJhMjgxODMzZDI5NDozNjIxNjU3OGVjZGYyMjQwN2I4YWY3MWRhNzcxNGFjNg==โ€™ contains an invalid expression โ€˜Expression โ€˜Basic QUM5NTM5YzlhOTU3ZTdjYjZjZjdhZjJhMjgxODMzZDI5NDozNjIxNjU3OGVjZGYyMjQwN2I4YWY3MWRhNzcxNGFjNg==โ€™ could not be parsed due to exception: The given key was not present in the dictionaryโ€ฆโ€™.

I have read the appsheet documentation to set up Basic Authetication headers, but Iโ€™m still not getting my headers right. From what I understood, I should write my header as follow:

Authorization: โ€œBasic QUM5NTM5YzlhOTU3ZTdjYjZjZjdhZjJhMjgxODMzZDsSSozNjIxNjUA3GVSSGYyMjQwN2I4YWY3MWRsjfNGFjNg==โ€

Is that right? Or what am I getting wrong?

Thanks in advance for your help!!

0 10 543
10 REPLIES 10

Thatโ€™s what I have with one of my working basic auth webhooks.
Try to change HTTP Content Type to JSON?

Steve
Platinum 4
Platinum 4

This is not an HTTP request, by any stretch:

Sorry, Iโ€™m just completely new at this. So the error is generated from the HTTP request body? So the headers are ok?

And for the body, can you help me? What I did was just copying and pasting the cURL code snippet I got from Postman. What should I do instead?

I have no ideaโ€“I have no experience with Twilio. But I know enough about HTTP to know a curl command line isnโ€™t valid. Someone else will have to guide you.

Heh, totally missed that Body when I looked at it.

Try the HTTP code instead
3X_e_5_e58451e4407e5e979fcdcc1bda8636f51e64e422.png

There should be a section at the bottom that includes all of your values (looks like To,From, and Body) wrapped inside of curly braces. Something like:

{
โ€œToโ€ : โ€œxxxxโ€,
โ€œFromโ€ : โ€œxxxxโ€,
โ€œBodyโ€ : โ€œxxxxโ€
}

Paste that into the Body field and see if it works.

Thanks for your help Mark! I did what you said and Iโ€™m not getting any error on my log anymore. Check it out.

Now the problem is that Iโ€™m not getting any message notification, even though thereโ€™s no error showing up in the log.
What could be wrong?

I suspect you need to format the Body as I showed in my previous post, as well as change the HTTP Content Type to JSON.

Thanks again Marc. I just did what you said and Iโ€™m still not getting any whatsapp message, even though thereโ€™s no error in my log.

Any other idea?

I also tried it with lower cases with no positive result.

{,
โ€œtoโ€: โ€œwhatsapp:+5XXX59721XX2โ€,
โ€œfromโ€: โ€œwhatsapp:+1415XXXX886โ€,
โ€œbodyโ€: โ€œxxxxxxxxxx!!!โ€,
}

Not without digging into the Twilio API docs and doing my own testing.

Top Labels in this Space