The Network to SMS module is a valuable component of the IoTaaP Network, enabling devices and applications to send SMS messages using their authentication code. This feature allows seamless SMS communication for all devices on the IoTaaP network, even those without built-in SMS capabilities.
In this example we will use third party MQTT Client tool. We will connect to network.iotaap.io
with our Network Credentials from IoTaaP Console.
Service topic: /iotaapsys/services/mqttsms
Message content:
{
"token":"qW3LuqeLcq42cBFb-2DtPKiNl47cc97fb394a1447cbbd5e10d1a80851-32d",
"receiver":"+385917851411",
"content": "Hello from IoTaaP SMS service.",
"callbackTopic": "/pgiIzx7n/smsservice/response"
}
We have to send a few parameters to this service in order to send SMS:
Please note that content maximum length is 120 characters, and if your message is longer than 120 characters, it will be automatically reduced to 120 characters.
Before publishing our message to the SMS service, we will subscribe to our callback topic.
Please note that you have to be the owner of callback topic root credential (Network Credential) user.
After publishing our message, we will receive response from the server:
If error happens during this operation you will receive the response to your callback topic. One of the possible responses is:
{
"error": "Token invalid!"
}
Received SMS
In a few seconds we will receive an SMS on our mobile phone: