SMS Notification using ClickSend - BAD_RESPONSE "The message array is empty"

Paul Baileya month ago

Hello everyone, I was hopping someone could steer me in the correct direction.
I have been trying to configure SMS notifications using the ClickSend SMS service and are receiving the following message when a notification is tested in the GUI:

{"http_code":400,"response_code":"BAD_REQUEST","response_msg":"The messages array is empty.","data":null} - MessageException (HttpSmsClient:99 < NotificatorSms:48 < Notificator:39 < NotificationResource:107 < ...)

My "traccar.xml" is below ( I have obscured all usernames and password):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
    <!-- Documentation: https://www.traccar.org/configuration-file/ -->
    <entry key='database.driver'>org.h2.Driver</entry>
    <entry key='database.url'>jdbc:h2:./data/database</entry>
    <entry key='database.user'>sa</entry>
    <entry key='database.password'></entry>

    <!-- SMTP settings added by PmB 23-Oct-24 -->
    <entry key='mail.smtp.host'>smtp.eu.mailgun.org</entry>
    <entry key='mail.smtp.port'>587</entry>
    <entry key='mail.smtp.starttls.enable'>true</entry>
    <entry key='mail.smtp.from'>traccar@XXXXXXX.CC.CC</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>traccar@XXXXXXX.CC.CC</entry>
    <entry key='mail.smtp.password'>XXXXXXXX</entry>

    <entry key='sms.enable'>true</entry>
    <entry key='notificator.types'>web,mail,sms</entry>
    <entry key='sms.http.url'>https://rest.clicksend.com/v3/sms/send</entry>
    <entry key='sms.http.user'>XXXXXX</entry>
    <entry key='sms.http.password'>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</entry>
    <entry key='sms.http.template'>
    {
        "messages": [
            {
                "source": "Traccar",
                "body": "{message}",
                "to": "{phone}"
            }
        ]
    }
    </entry>
</properties>

After some reading and a process of elimination I can get the SMS to be delivered if i replace the "{message}" in the body part of the template with a simple string of text, for example if I change "body": "{message}" to "body": "Hello World" the notification is delivered as expected and no error.
What am I missing? Have I not configured something or is the placeholder {message} not correct.

Server version is 6.5
Any help is gratefully received.
Kind regards Paul

Anton Tananaeva month ago
Paul Baileya month ago

Hi Anton, thanks for the prompt response.
I have updated to the "preview" version as suggested above and I can confirm the SMS notifications are now working as expected.
Thanks for a great product.
Paul