You are on page 1of 2

Response (when wrong access token):

<xml>
<error_text>Invalid Access token</error_text>
<status>error</status>
</xml>
Response (when modem doesn’t exist):
<xml>
<error_text> Wrong modem number</error_text>
<status>error</status>
</xml>

58. Get modem state: JSONRPC method

HTTP POST METHOD:


https://url-of-smseagle/jsonrpc/sms

Parameter Description

access_token authentication access token (see details in point API Authentication)

login your user to login to SMSEagle (see details in point API Authentication)

pass your password to login to SMSEagle

modem_no (optional parameter) modem number to be queried (default = 1). Used only in
multimodem devices

responsetype (optional parameter) text = format response as text (default), xml = format
response as XML object

BODY:
{"method":"sms.get_modem_state",
"params":{"access_token"="0005gOjCOlMH8F2BPo8mWqcGzycVHRLq"}}

RESPONSE:
{"result": enabled / disabled }
Sample response: {"result":"enabled"}
Response (when wrong logindata): {"result": "Invalid login or password"}
Response (when wrong access token): {"result": "Invalid access token"}
Response (when modem doesn’t exist): {"result": "Wrong modem number"}

RESPONSE (EXTENDED):
Response:
{"result":{"modem_status": enabled / disabled,"status":"ok"}}

Sample response: {"result": {"modem_status":"Wrong modem

144 | SMSEagle NXS-9700 | User’s Manual


number","status":"ok"}}

Response (when wrong logindata):


{"result": {"error_text":"Invalid login or password","status":"error"}}

Response (when wrong access token):


{"result": {"error_text":"Invalid access token","status":"error"}}
Response (when modem doesn’t exist):
{"result": {"error_text":"Wrong modem number","status":"error"}}

59. Set modem state: HTTP GET method

HTTP GET METHOD:


https://url-of-smseagle/http_api/set_modem_state

Parameter Description

access_token authentication access token (see details in point API Authentication)

login your user to login to SMSEagle (see details in point API Authentication)

pass your password to login to SMSEagle

modem_no (optional parameter) modem number for status change (default = 1). Used only in
multimodem devices

status enabled / disabled

responsetype (optional parameter) text = format response as text (default), xml = format
response as XML object

EXAMPLES:
https://url-of-smseagle/http_api/set_modem_state?
access_token=0005gOjCOlMH8F2BPo8mWqcGzycVHRLq&modem_no=1&status=enabled

RESPONSE:
Response: OK
Response (when wrong logindata): Invalid login or password
Response (when wrong access token): Invalid access token
Response (when modem doesn’t exist): Wrong modem number
Response (when wrong modem state): Wrong modem state

RESPONSE (XML):
Response:
<xml>
<status>
ok
</status>
</xml>

Response (when wrong logindata):

145 | SMSEagle NXS-9700 | User’s Manual

You might also like