[comment]: # ({860084e0-860084e0})
# user.logout

[comment]: # ({/860084e0-860084e0})

[comment]: # ({16cc3db9-16cc3db9})
### Description

`string/object user.logout(array)`

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

[comment]: # ({/16cc3db9-16cc3db9})

[comment]: # ({4fa8a419-4fa8a419})
### Parameters

`(array)` The method accepts an empty array.

[comment]: # ({/4fa8a419-4fa8a419})

[comment]: # ({66018290-66018290})
### Return values

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

[comment]: # ({/66018290-66018290})

[comment]: # ({b41637d2-b41637d2})
### Examples

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({b5326b2b-b5326b2b})
#### Logging out

Log out from the API.

Request:

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

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": true,
    "id": 1
}
```

[comment]: # ({/b5326b2b-b5326b2b})

[comment]: # ({02f79c40-02f79c40})
### See also

-   [user.login](login)

[comment]: # ({/02f79c40-02f79c40})

[comment]: # ({4cc4bf93-4cc4bf93})
### Source

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

[comment]: # ({/4cc4bf93-4cc4bf93})
