object user.checkAuthentication

This method checks and prolongs user session.

Calling the user.checkAuthentication method with the parameter sessionid set prolongs user session by default.


The method accepts the following parameters.

Parameter Type Description
extend boolean Whether to prolong the user session.

Default value: "true".
Setting the value to "false" allows to check the user session without prolonging it.

Parameter behavior:
- supported if sessionid is set
sessionid string User session ID.

Parameter behavior:
- required if token is not set
secret string Random 32 characters string. Is generated on user login.
token string User API token.

Parameter behavior:
- required if sessionid is not set

Return values

(object) Returns an object containing information about user.



           "jsonrpc": "2.0",
           "method": "user.checkAuthentication",
           "params": {
               "sessionid": "673b8ba11562a35da902c66cf5c23fa2"
           "id": 1


           "jsonrpc": "2.0",
           "result": {
               "userid": "1",
               "username": "Admin",
               "name": "Zabbix",
               "surname": "Administrator",
               "url": "",
               "autologin": "1",
               "autologout": "0",
               "lang": "ru_RU",
               "refresh": "0",
               "theme": "default",
               "attempt_failed": "0",
               "attempt_ip": "",
               "attempt_clock": "1355919038",
               "rows_per_page": "50",
               "timezone": "Europe/Riga",
               "roleid": "3",
               "type": 3,
               "userdirectoryid": "0",
               "ts_provisioned": "0",
               "sessionid": "673b8ba11562a35da902c66cf5c23fa2",
               "debug_mode": 0,
               "secret": "0e329b933e46984e49a5c1051ecd0751",
               "userip": "",
               "gui_access": 0,
               "deprovisioned": false,
               "auth_type": 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).


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