[comment]: # translation:outdated

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

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

[comment]: # ({new-d6ff52eb})
### Description

`string/object user.logout(array)`

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

::: noteclassic
This method is available to users of any type. Permissions
to call the method can be revoked in user role settings. See [User
roles](/manual/web_interface/frontend_sections/administration/user_roles)
for more information.
:::

[comment]: # ({/new-d6ff52eb})

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

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

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

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

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

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

[comment]: # ({b41637d2-b41637d2})
### Приклади

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

[comment]: # ({new-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]: # ({/new-b5326b2b})

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

-   [user.login](login)

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

[comment]: # ({7fd9f53c-7fd9f53c})
### Джерело

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

[comment]: # ({/7fd9f53c-7fd9f53c})
