Zabbix Documentation 4.0

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

manual:api:reference:user:user.checkauthentication

user.checkAuthentication

Description

object user.checkAuthentication

This method checks and prolongs user session.

Parameters

The method accepts the following parameters.

Parameter Type Description
extend boolean Default value: “true”. Setting it's value to “false” allows to check session without extending it's lifetime. Supported since Zabbix 4.0.
sessionid string User session id.
Calling user.checkAuthentication method prolongs user session by default.

Return values

(object) Returns an object containing information about user.

Examples

Request:

{
    "jsonrpc": "2.0",
    "method": "user.checkAuthentication",
    "params": {
        "sessionid": "8C8447FF6F61D134CEAC740CCA1BC90D"
    },
    "id": 1
}

Response:

{
    "jsonrpc": "2.0",
    "result": {
        "userid": "1",
        "alias": "Admin",
        "name": "Zabbix",
        "surname": "Administrator",
        "url": "",
        "autologin": "1",
        "autologout": "0",
        "lang": "ru_RU",
        "refresh": "0",
        "type": "3",
        "theme": "default",
        "attempt_failed": "0",
        "attempt_ip": "127.0.0.1",
        "attempt_clock": "1355919038",
        "rows_per_page": "50",
        "debug_mode": true,
        "userip": "127.0.0.1",
        "sessionid": "8C8447FF6F61D134CEAC740CCA1BC90D",
        "gui_access": "0"
    },
    "id": 1
}

Response is similar to User.login call response with “userData” parameter set to true (the difference is that user data is retrieved by session id and not by username / password).

Source

CUser::checkAuthentication() in frontends/php/include/classes/api/services/CUser.php.