Templates Plugins Courses

Payload Problem With ClickSend Done Right Send SMS


#1

Hey folks…

I’m using the Bubble ClickSend Done Right plugin to send SMS. I can send messages okay… BUT only if they do not include a new line ("\n") character. I’ve contacted clicksend, and they tell me the payload is full of “\n” that shouldn’t be there. The problem is the same with your clicksend plugin or theirs. I’m using your latest release.

The details are below!
Best wishes,
Antony.

Here is what gives the Payload Error:

Raw error from click send Done Right - Send SMS (Action): {"http_code":400,"response_code":"BAD_REQUEST","response_msg":"Invalid request payload. Error: Control character error, possibly incorrectly encoded.","data":{"request":"  {\n    \"messages\": [\n      {\n        \"source\": \"php\",\n        \"body\": \"This is lots of content but without any brackets quite yet... \nMeals During the workshop the meal times will be tasty! :-)\",\n        \"to\": \"+447812070413\",\n        \"lang\": \"en\",\n        \"from\": \"+447812070413\",\n        \"custom_string\": \"abc123\"\n      }\n      \n      \n    ]\n  }"}}

And here is what ClickSend believe Bubble should be sending:

    {
"messages": [
{
"body":"This is lots of content but without any brackets quite yet... \nMeals During the workshop the meal times will be tasty! :-)",
"to": "+447812070413",
"from": "+447812070413",
"source": "php",
"custom_string": "abc123"
}
]
} 

*the email may strip out the new line character*

#2

Hello, @antony .

We’ll look into the issue and update asap.
Thanks for understanding.


Update

Please upgrade the plugin to the latest version fixes that were made. However the plugin still requires for you to not use the new line “\n” parameter for sending the sms.
As Clicksend replied to you, you’ll need to remove the \n character in the message.
Hope this helps.


#3

just want to make sure, @antony received the last post update thus writing a separate post here.