Hi,
I am trying to add sms api in traccar but fail. Maybe I am not making the right code please check and let me know where I have gone wrong.
POST URL: http://siteurl.com/api/send.php?number=1xxxxxxx&type=text&message=test%20message&instance_id=63A8A5xxxxx&access_token=9bcde43cba3fe9xxxxxx
Url is working fine .
In JSON:
<entry key='notificator.types'>web,mail,sms,firebase</entry>
<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>http://siteurl.com/api/send.php?</entry>
<entry key='sms.http.template'>{
"number":"{phone}",
"type":"text",
"message":"{message}",
"instance_id":"63A8Axxxx",
"access_token":"9bcde43cba3fe97edb3ccxxxxxxxxxx"
}
</entry>
Code is not working
Does your API accept JSON?
Or what do I need to do if it doesn't supported.
You need to use the format that is supported.
POST URL: http://siteurl.com/api/send.php?number=1xxxxxxx&type=text&message=test%20message&instance_id=63A8A5xxxxx&access_token=9bcde43cba3fe9xxxxxx
Post url
Message sent successfully on OpenLink. But I don't understand how to implement in traccar.
We do not support query parameters.
Hi,
I am trying to add sms api in traccar but fail. Maybe I am not making the right code please check and let me know where I have gone wrong.
Url is working fine .
In JSON:
<entry key='notificator.types'>web,mail,sms,firebase</entry> <entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry> <entry key='sms.http.url'>http://siteurl.com/api/send.php?</entry> <entry key='sms.http.template'>{ "number":"{phone}", "type":"text", "message":"{message}", "instance_id":"63A8Axxxx", "access_token":"9bcde43cba3fe97edb3ccxxxxxxxxxx" } </entry>
Code is not working