|
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>
|