Traccar can use an external SMS API to send notifications and device commands. The configuration is flexible and can work with many different SMS APIs. Following are some configuration examples for popular services.
Replace TOKEN with the token from the app. If you want to connect to you phone directly, replace URL with the URL from the app and use API key instead of token.
<entry key='notificator.types'>web,mail,sms</entry> <entry key='sms.http.url'>https://www.traccar.org/sms/</entry> <entry key='sms.http.authorization'>TOKEN</entry> <entry key='sms.http.template'> { "to": "{phone}", "message": "{message}" } </entry>
Replace account SID, token, and source phone number with correct values. Note that phone number has to be URL encoded.
<entry key='notificator.types'>web,mail,sms</entry> <entry key='sms.http.url'>https://api.twilio.com/2010-04-01/Accounts/[YOUR ACCOUNT SID]/Messages.json</entry> <entry key='sms.http.user'>[YOUR ACCOUNT SID]</entry> <entry key='sms.http.password'>[YOUR AUTH TOKEN]</entry> <entry key='sms.http.template'> From=[YOUR PHONE NUMBER]&To={phone}&Body={message} </entry>
Replace username and password with correct values for your account.
<entry key='notificator.types'>web,mail,sms</entry> <entry key='sms.http.url'>https://rest.clicksend.com/v3/sms/send</entry> <entry key='sms.http.user'>[USERNAME]</entry> <entry key='sms.http.password'>[PASSWORD OR API KEY]</entry> <entry key='sms.http.template'> { "messages": [ { "source": "Traccar", "body": "{message}", "to": "{phone}" } ] } </entry>
Replace token id and token secret with appropriate values for your account.
<entry key='notificator.types'>web,mail,sms</entry> <entry key='sms.http.url'>https://api.bulksms.com/v1/messages</entry> <entry key='sms.http.user'>[YOUR TOKEN ID]</entry> <entry key='sms.http.password'>[YOUR TOKEN SECRET]</entry> <entry key='sms.http.template'> { "to": "{phone}", "body": "{message}" } </entry>