API
Fetch the active SIM SMS according to connId.
Available in 8.1.0 or later
Input Parameters
Type | Notation | Mandatory | Description | |
connId | Number | <conn_id> | require | Get the SMS according to WAN connection ID |
Return Parameters
Return JSON
Type | Notation | Description | |
connId | String | <hash> | Access Token |
simId | Number | [1,2] | Authorization type. Always out 3 for client credentials grant |
sms | Array | list of <SMS_Obj> | List of SMS message |
<SMS_Obj>
Type | Notation | Description | |
sender | String | <string> | Sender of the SMS |
message | Array | list of <Message_obj> | The list of the message |
<Message_Obj>
Type | Notation | Description | |
id | Number | <int> | The ID of the SMS |
date | String | <string> | Date of the SMS |
timestamp | Number | <timestamp> | Timestamp of the SMS |
length | Number | <integer> | Length of the SMS content |
content | String | <string> | SMS content |
cURL Example
curl -b cookies.txt http://192.168.1.1/api/cmd.sms.get?connId=6
{ "stat": "ok", "response": { "connId": 6, "simId": 1, "sms": [ { "sender": "988", "message": [ { "id": 1, "date": "Feb 17 13:55", "timestamp": 1581774925, "length": "50", "message": "The is the 1st line SMS,\and this is the 2nd line." } ] }, { "sender": "+81325359875", "message": [ { "id": 2, "date": "Feb 05 01:55", "timestamp": 1580867113, "length": "24", "message": "Multipart message part 1" }, { "id": 6, "date": "Feb 05 01:55", "timestamp": 1580867113, "length": "24", "message": "Multipart message part 2" } ] } ] } }