Incoming SMS

In this section you may learn how Incoming SMS work in Monogoto network.

Incoming SMS

The way to receive an incoming SMS to a Thing (IoT device), is via the webhook.

Please note that if the device is not online, there is no webhook notification. Only when the device is online the webhook will be sent.

Incoming SMS via the webhook from self-service console:

1. Login to the Monogoto portal and go to Things Groups.

2. Press on the Edit button in the Thing Group you wish to have Webhook configurations.

3. In the Edit Thing group window, please enter a webhook address in the field Webhook for MT SMS.

4. Scroll down to the bottom of the page and press button SAVE & CLOSE.

Done. Now when one of your things in this group receives an MT SMS, a webhook will be sent to your entered address.

Please note that you may use Test button near your entered webhook address to check if your entered address is able to receive webhook from Monogoto portal.

SMS status check via the self-service console:

1. Click Things from the sidebar menu.

2. Find a Thing that you wish to check and open it’s Thing Menu.

3. Scroll down to Events, they show SIM logs.

4. In Events, please check if you can see any events about webhooks near the SMS message event.

No event about webhook = indicates that the webhook was sent successfully. Webhook retry times = usually indicates that the webhook failed to reach the entered address.

Below you can see failed webhook example:

Incoming SMS from the self-service console to the device

1. Click Things from the sidebar menu.

2. Select a Things Group and click the Thing name to display the Things Group settings.

3. Click the Edit icon for a Thing Name in the list. The Thing Information screen is displayed.

4. Click Send SMS to Thing.

5. Enter a name in the From field.

6. Type a Message.

7. Click Send.

SMS status check via the self-service console:

1. Click Things from the sidebar menu.

2. Find a Thing that you wish to check and open it’s Thing Menu.

3. Scroll down to Events, they show SIM logs.

4. In Events, please check the logs for SMS events.

Success = SMS message reached recipient successfully. Failure = SMS message failed to reach recipient, due to some reason. Usually the reason should be stated in the same Event.

Incoming SMS from the API to the device:

To send an SMS from the portal to a single Thing, please use following request:

curl -X POST "https://console.monogoto.io/thing/ThingId_ICCID_<<<_THING_ICCID_>>>/sms" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer <<<_TOKEN_HERE_>>>" -d "{ \"Message\": \"<<<_SMS_CONTENT_>>>\", \"From\": \"<<<_SENDER_NAME_>>>\"}"

Please note that the above shown command needs to be replaced with information: <<<_THING_ICCID_>>> - replace with your Monogoto thing ICCID number <<<_TOKEN_HERE_>>> - replace with your token <<<_SMS_CONTENT_>>> - replace with your SMS message content <<<_SENDER_NAME_>>> - replace with sender name you wish recipient to see

Example of request:

curl -X POST "https://console.monogoto.io/thing/ThingId_ICCID_8912372646888991/sms" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" -d "{ \"Message\": \"Hello\", \"From\": \"console\"}"

Expected result (showing Thing ID and SMS ID):

ThingId_ICCID_8912372646888991_1606995009188_0.4954212857733442

SMS status check via the self-service console:

1. Click Things from the sidebar menu.

2. Find a Thing that you wish to check and open it’s Thing Menu.

3. Scroll down to Events, they show SIM logs.

4. In Events, please check the logs for SMS events.

Success = SMS message reached recipient successfully. Failure = SMS message failed to reach recipient, due to some reason. Usually the reason should be stated in the same Event.