Send an SMS with Teltonika RMS API

Hi Everyone,

I would like to know what is the process to follow to send an SMS via Teltonika RMS API using your PAT (Personal Access Tokens) ?

I am confused by the API documentation which provides multiple endpoints without clarifying the specific one to be used for SMS sending and unfortunately, I could not find anywhere a clear example of a step-by-step process to follow for sending SMS with the RMS API.

Your help is much appreciated.

Best Regards

Hello,

For testing, try the following command from the router’s CLI:

  • api POST /messages/actions/send '{"data":{"number":"<Phone_number>","message":"Test","modem":"3-1"}}'

For example:
image

To get the modem ID, the following command can be used:

  • cat /etc/config/simcard | grep modem

From Postman application, it can look as follows:

Best regards,

Hello @Sigismundus,

Many thanks for your answer and clear instructions. This indeed worked perfectly on my local network.

Do you have any idea on how I can use an endpoint which does not rely on my local network? For example FOTA provides an endpoint which you can use for Teltonika GPS devices management. Is there a similar endpoint to access the Router and send SMS messages without being connected to my local network?

Any feedback is very much appreciated.

Best regards,

Hello,

My bad. I managed to miss the RMS part in your initial comment.

RMS does have an API call, that allows executing CLI commands on the router, including the one I’ve shared previously to send an SMS.

You can find a more detailed description in the API documentation here: API Reference | Developers

In Postman, you need to use the following endpoint:

  • https://rms.teltonika-networks.com/api/devices/<Device_RMS_ID>/command

Then you need the following message body:
{
"command": "api POST /messages/actions/send '{\"data\":{\"number\":\"0037060000000\",\"message\":\"Test\",\"modem\":\"3-1\"}}'"
}

For example:

Do not forget that you also need to generate an authentication token from your RMS account settings page:

And apply it before executing the API call:

Best regards,

1 Like

Hello @Sigismundus,

Wonderful! Many thanks again for your help and support regarding this topic.

Best Regards,

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.