SMS API settings

Fareed Qureshi2 years ago

Hi,

I m trying to configure SMS API for my server but it is not working, I have configure it with below steps.
My API format for sending message is as below

https://xxxx.xxxx.xxxx/sendsms.html?Username=xxxxxx&Password=xxxxxxx&From=xxxxxx&To=xxxxxxx&Message=xxxxxxxx

I have configure below in traccar.xml

<entry key='notificator.types'>web,mail,sms</entry>
<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>https://xxxx.xxxx.xxxx/sendsms.html</entry>
<entry key='sms.http.Username'>xxxxxxx</entry>
<entry key='sms.http.Password'>xxxxxxxx</entry>
<entry key='sms.http.template'>
    {
        "To": "{phone}",
        "Message": "{message}"
    }
</entry>

Please confirm what is wrong here and how it can be fixed.

Anton Tananaev2 years ago

Why are you sending JSON body? Does the API support it?