0
{"error":{"code":21,"description":"Payload data is malformed."}}

I am sending the request as described in the example in clickatell but when i am sending request to whatsapp messages as channel then i am getting error code 21.

{
  "messages": [
    {
        "to": "923172634024",
        "channel": "whatsapp",
        "content": "Example message using default channel"
      }
    }
    
]

}

I am sending request to this api endpoint https://platform.clickatell.com/v1/message

Hassaan
  • 319
  • 2
  • 26

1 Answers1

2

Your brackets don't match up. You have an extra } before the final ] that needs to be removed. Everything else seems fine! Try this fix:

{
  "messages": [
    {
        "to": "923172634024",
        "channel": "whatsapp",
        "content": "Example message using default channel"
      }
    
    
    ]
}