aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/sms/HttpSmsClient.java
AgeCommit message (Collapse)Author
2018-12-27SMS client: Changes to support msg91Syed Mujeer Hashmi
The authorization header may require different name:value pair for specifying token by the service provider. Add a config parameter "sms.http.authorizationName" to support this. In case of msg91, the name required is "authkey". The newline at the end of short templates are causing invalid json in request. Get rid of the newline using trim(). The required config to enable msg91 sms notifications are <entry key='notificator.types'>web,mail,sms</entry> <entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry> <entry key='sms.http.url'>http://api.msg91.com/api/v2/sendsms</entry> <entry key="sms.http.authorizationName">authkey</entry> <entry key='sms.http.authorization'>[YOUR TOKEN]</entry> <entry key='sms.http.template'> { "sender": "SOCKET", "route": "4", "country": "91", "sms": [ { "message": "{message}", "to": ["{phone}"] } ] } </entry> Signed-off-by: Syed Mujeer Hashmi <mujeerhashmi@gmail.com>
2018-11-10Fix some FindBugs issuesAnton Tananaev
2018-11-04Fix issue with SMS eventsAnton Tananaev
2018-11-02Implement universal HTTP SMS managerAnton Tananaev