Check if MT SMS was Received

This guide will provide a small guidance on how to check if MT SMS message from portal to your Thing was received successfully.

Check if MT SMS was received

POST https://console.monogoto.io/thing/searchCDR

Headers

Name
Type
Description

YOUR_TOKEN*

String

Your authentication token

CUSTOMER_ID*

String

Customer API key

Request Body

Name
Type
Description

ICCID

String

The ICCID of your SIM

EVENT_DATA_TYPE

String

The Event message type to be displayed. Read more

EVENT_MESSAGE_TYPE

String

Replace with the Event message type to be displayed. Read more

LIMIT

String

Replace with the amount of results you would like to see

{
  "totalResults": 2,
  "hits": [
    {
      "_source": {
        "EsDataType": "MT_SMS",
        "Severity": "Info",
        "message": "Success. txId=ThingId_ICCID_8912372646888991_1636397785991_0.7279801033980184 SMS txId=ThingId_ICCID_8912372646888991_1636397785991_0.7279801033980184 from console to ICCID 8912372646888991",
        "Timestamp": 1636397786551,
        "MessageType": "CDR"
      }
    },
    {
      "_source": {
        "EsDataType": "MT_SMS",
        "Severity": "Info",
        "message": "Success. txId=ThingId_ICCID_8912372646888991_1636111732365_0.10960520849291022 SMS txId=ThingId_ICCID_8912372646888991_1636111732365_0.10960520849291022 from console to ICCID 8912372646888991",
        "Timestamp": 1636111734800,
        "MessageType": "CDR"
      }
    }
  ]
}

Please note that in order for SMS message to reach a Thing, it must be connected to the network.

Example using cURL:

curl -X POST \
    --url "https://console.monogoto.io/thing/searchCDR" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer {YOUR_TOKEN}" \
    -H "apikey: {CUSTOMER_ID}" \
    -d "{ \"ThingIdELK\": \"ThingId_ICCID_{ICCID}\", \"EsDataTypeELK\": \"{EVENT_DATA_TYPE}\", \"MessageTypeELK\": \"{EVENT_MESSAGE_TYPE}\", \"limit\": \"{:LIMIT}\"}"    

Please note that the above shown command needs to be replaced with information:

{TOKEN_HERE} - replace with your token

{ICCID} - replace with the ICCID of your SIM

{EVENT_DATA_TYPE} - replace with the Event message type to be displayed. You may find data types list following this link

{EVENT_MESSAGE_TYPE} - replace with the Event message type to be displayed. You may find message types list following this link

{LIMIT} - replace with the number of results you would like to see that are matching your search results. Entering 1 will show the last SMS result.

If needed this API can be tested and used in the Monogoto Console following this path: Thing POST /thing/searchCDR

Example of request:

curl -X POST \
    --url "https://console.monogoto.io/thing/searchCDR" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" \
    -H "apikey: cid_eb424686-8943a-4f4h4-9b6d-3627a666333b" \
    -d "{ \"ThingIdELK\": \"ThingId_ICCID_8912372646888991\", \"EsDataTypeELK\": \"MT_SMS\", \"MessageTypeELK\": \"CDR\", \"limit\": \"1\"}"

Example of expected result showing last 1 MT SMS from the portal that was successful:

{
  "totalResults": 1,
  "hits": [
    {
      "_source": {
        "EsDataType": "MT_SMS",
        "Severity": "Info",
        "message": "Success. txId=ThingId_ICCID_8912372646888991_1636397785991_0.7279801033980184 SMS txId=ThingId_ICCID_8912372646888991_1636397785991_0.7279801033980184 from console to ICCID 8912372646888991",
        "Timestamp": 1636397786551,
        "MessageType": "CDR"
      }
    }
  ]
}

Please note that in order to know the human date/time please use Epoch time converter. You can find it following this link.

Last updated

Was this helpful?