Login and logout

To execute any request in Wialon, you must sign in and get a session ID.

Login

To sign in, use the token/login method. In the example below, this method is used to sign in to https://hst-api.wialon.com.

Copied!
https://hst-api.wialon.com/wialon/ajax.html?svc=token/login&
	params={
		"token":"<your_token>"
	}

Response example:

Copied!
{
    "host": "212.98.173.107",
    "eid": "<your_sid>",
    "tm": 1358415984,
    "user": {
        "nm": "wialon_test",
        "cls": 1,
        "id": 50935,
        "prp": {
            "addr_provider": "map_visicom",
            "cfmt": "0",
            "city": "Mexico",
            "dst": "-1",
            "fpnl": "monitoring",
            "language": "ru",
            "show_log": "0",
            "tz": "134232128",
            "user_settings_hotkeys": "1",
            ...
        },
        "crt": 0,
        "bact": 50936,
        "fl": 6,
        "hm": "",
        "uacl": 2097795
    },
    "token": "{\"app\":\"Wialon Hosting\",\"ct\":1443682655,\"at\":1443682655,\"dur\":2592000,\"fl\":-1,\"p\":\"{}\",\"items\":[]}",
    "th": "<your_token>",
    "classes": {
        "avl_hw": 4,
        "avl_resource": 3,
        "avl_retranslator": 7,
        "avl_route": 6,
        "avl_unit": 2,
        "avl_unit_group": 5,
        "user": 1
    },
    "features": {
        "unlim": 1,
        "svcs": { 
            ... 
        }
    }
}

For further operations, the session ID from the eid field is required.

Logout

To stop working with Wialon and log out of the system, deactivate the session using the core/logout method. For example:

Copied!
https://hst-api.wialon.com/wialon/ajax.html?svc=core/logout&params={}&sid=<your_sid>

Response example:

Copied!
{
	"error":0
}

Such a result indicates that you have signed out successfully.

The parameters of this request and the returned value are described on the core/logout page.

If you find a mistake in the text, please select it and press Ctrl+Enter.