You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.

user.logout

Description

string/object user.logout(array)

This method allows to log out of the API and invalidates the current authentication token.

This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(array) The method accepts an empty array.

Return values

(boolean) Returns true if the user has been logged out successfully.

Examples

Logging out

Log out from the API.

Request:

{
           "jsonrpc": "2.0",
           "method": "user.logout",
           "params": [],
           "id": 1
       }
Copy
✔ Copied

Response:

{
           "jsonrpc": "2.0",
           "result": true,
           "id": 1
       }
Copy
✔ Copied

See also

Source

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

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.