Sending MT Messages - HTTP POST
You can send an MT (mobile-terminated) message from your application, to your RockBLOCK, using this HTTP POST endpoint.
Your message will be queued immediately, and will be downloaded by your RockBLOCK when it next initiates an SBD session. If powered on, and has network availability, the RING ALERT signal will be asserted.
POST URL and Query Params:
https://rockblock.rock7.com/rockblock/MT
Parameter | Format | Description |
---|---|---|
imei (string) | 300434065264590 | The IMEI of your RockBLOCK |
username (string) | username | Your RockBLOCK portal username |
password (string) | password | Your RockBLOCK portal password |
data (string) | 48656C6C6F20576F726C64 | Your message, as a hex-encoded byte array |
flush (string) | yes | (optional) Flushes the MT queue if set to "yes" |
Example
curl --request POST \
--url 'https://rockblock.rock7.com/rockblock/MT?imei=300434065264590&username=myUser&password=myPass&data=48656C6C6F20576F726C64&flush=yes' \
--header 'accept: text/plain'
Response:
OK,4114651
Response format:
The response body will be a list of values, separated by commas. The first value is the status and will either be OK
or FAILED
.
If the status is OK
, the second value will be the mtId
(mobile-terminated identifier).
If the status is FAILED
, the second value will be an integer error code and the third value will be it's text description.
Error codes:
Error code | Description |
---|---|
10 | Invalid login credentials |
11 | No RockBLOCK with this IMEI found on your account |
12 | RockBLOCK has no line rental |
13 | Your account has insufficient credit |
14 | Could not decode hex data |
15 | Data too long |
16 | No data |
99 | System Error |