beautypg.com

4 api, 1 enabling the api, 2 connecting to the api – Dovado GO User Manual

Page 21: 3 logging in to the api, 4 api syntax, Part 4, Enabling the api, Connecting to the api, Logging in to the api, Api syntax

background image

T h e M o b i l e C h o i c e f o r y o u r B r o a d b a n d I n t e r n e t

Menu System

21

© 2014 Dovado FZ-LLC

4

API

The Application Programmable Interface (API) allows you to create your own custom interface with
the router. You can control certain features such as SMS messaging.

4.1

Enabling the API

To enable the API please do the following.

LAN Access:
Go to System-> Remote Management
Click Enable LAN management
Click API Over LAN
Do not forget to reboot the router after activating the API.

4.2

Connecting to the API

The API operates on port 6435.

To connect you can for example, type in the following within a console:
telnet 192.168.0.1 6435 (or change 192.168.0.1 to the IP of your router).
If the connection was successful you will receive something similar to:

This is version X.Y of the API
SMS is enabled

Followed by a '>>'-prompt

4.3

Logging in to the API

The API uses the Username and Password as specified in the Web GUI.
To log in as user admin, type:

user admin

When prompted for a password, enter it using the following syntax:

pass password

(The user and password is configured on the SYSTEM->USERS page)
If the login fails, verify & re-enter your credentials until

access is granted.

4.4

API Syntax

To display information about the GUI functions and syntax, type help.

Commands:

help (show this help)
exit|quit|bye (close the telnet session)
user [username] (log in as user)
pass [secret_password] (log in with secret_password)
info (prints general information about the router)
services (lists services)
upgrade (upgrades router to latest available firmware)

SMS:

sms list (returns number of unread/read messages)
sms send [PDU]
sms sendtxt NUMBER [ENCODING]

NUMBER:international format without the leading +. A leading s indicates short SMS

(eg s4612345678)

ENCODING:ISO|UCS (ISO for ascii < 256). Leave blank for autodetection

sms recv [ID] (returns PDU with ID or all PDUs in the inbox if ID is empty [ID:PDU])
sms recvtxt [ID] (returns cleartext SMS with ID or all cleartext SMS in the inbox