This is a translation of the original English documentation page. Help us make it better.

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.

Parametri

(array) Il metodo accetta un array vuoto.

Valori di ritorno

(boolean) Restituisce true se l'utente è stato disconnesso correttamente.

Esempi

Logging out

Log out from the API.

Request:

{
           "jsonrpc": "2.0",
           "method": "user.logout",
           "params": [],
           "id": 1,
           "auth": "16a46baf181ef9602e1687f3110abf8a"
       }

Response:

{
           "jsonrpc": "2.0",
           "result": true,
           "id": 1
       }

Guarda anche

Fonte

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