Twilio SMS Reply as Traccar Message

MichaelLE8 days ago

Hello,

some of my devices (TK918) are only programmable by SMS. The answer of the devices is via SMS, too.

Sending SMS with traccar and twilio works really fine. But the answer is received by twilio.

Is it possible to forward theese SMS to traccar, so that theese answers are shown like the command-replies of other devices?

For example:
SMS to device: admin123456 +49....
Answer to twilio: admin ok

and this should be forwarded to traccar.

Thank you!
Michael

Thiago Araújo8 days ago

Hello Michael,

Yes, it’s possible, but not directly out of the box. You need to use Twilio’s inbound SMS webhook and forward those messages into Traccar through its API. In practice, this means:

  • Configure Twilio to send incoming SMS to your server (webhook).

  • Write a small service that receives the message, maps it to the correct device, and then pushes it to Traccar.

  • Depending on your needs, you can save it as a commandResult event/attribute (so it shows as a command response).

This way, the SMS answers from devices will appear inside Traccar similarly to regular command replies.

MichaelLE8 days ago

Very nice. Thank You Thiago.

Sending incoming SMS from Twilio to server is working.

But what do you mean with:
Write a small service that receives the message, maps it to the correct device, and then pushes it to Traccar.
?

Kaldek6 days ago

If you send a command to a device via SMS, and the device replies to Twilio, he's saying that for that to be recieved as a "Command Result"for that device in Traccar it needs extra work.

I previously thought the responses were handled automatically but then, that's probably a bad memory because all of our SIM cards have SMS MO disabled!