traccar sms client doesn't work with http sms api using &

Arvind2 years ago

Hi,
I am trying to SMS http api but it is not working after checking i found that & symbol inside template creating problem.

<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://url/api/send.php?</entry>
<entry key='sms.http.template'>number={phone}&type=text&message={message}&instance_id=63A8A5FA3CAB4&access_token=9bcde43cba3fe97edb3cc78599ef06c7</entry>

if anyone can pass correct config .
thanks

Sandor2 years ago

If the '&' indeed would be a problem did you try url encoding it on forehand to see it it works around the issue ?

number%3D%7Bphone%7D%26type%3Dtext%26message%3D%7Bmessage%7D%26instance_id%3D63A8A5FA3CAB4%26access_token%3D9bcde43cba3fe97edb3cc78599ef06c7

This is a known trick to circumvent special chars in a string.

Haider 2 years ago

Do not work

Sandor2 years ago

What is the name of the provider you try to use so i can have a look at their tech docs.
Recently I ompleted a connection with sms broker cm.com via traccar