Can't get Webhook Working

Hello,

I am trying to send a whatsapp message through a rest api once a new row is added in table. So I have created a behavious and added a webhook action like:

Preset: Custom
URL: https://app.messageautosender.com/api/v1/message/create
HTTP Verb: POST
HTTP Content Type: JSON
Body:
{
‘username’ : “name”,
‘password’ : “password”,
‘recipientIds’ : “<>”,
‘Message’ : “Hi”
}

While testing this code, I am getting a bad response error. Can some guide me as to where am I going wrong and what am I missing in the format.

I have used my API in AppScript and that seems to be working fine. I am also attaching a sample of my AppScript Code…

var params = {
‘username’ : Username,
‘password’ : Password,
‘recipientIds’ : ID,
‘Message’ : Message
};

var options ={
‘method’ : ‘post’,
‘payload’ : params
};

var result= UrlFetchApp.fetch(“https://app.messageautosender.com/api/v1/message/create”, options);

I have been trying to figure this error out from months. It’ll be appreciated if anyone can help.

0 3 1,400
3 REPLIES 3

What is the error message is saying ?

Also worth trying to change the JSON, removing single quote and use double quote instead.

Tried Double quote asa well… Didn’t work…

Error Message:
Failed: Webhook HTTP post request failed with exception The remote server returned an error: (400) Bad Request.

I am thinking I am doing something wrong in setting it up cause its working in app script code. Any other suggesstions?

There are two types of double quotes…

That was my case with google chat webhooks with thay 400 error. Please check this thread https://www.google.com/url?sa=t&source=web&rct=j&url=https://community.appsheet.com/t/integration-wi...

Top Labels in this Space