# Take a user out of everything

`POST https://rest.wordplus.cloud/wordplus/realtime/users/{id}/disconnect`

Takes a user out of everything at once, on every connection: their pages leave every room, the realtime server
forgets who they are and stops their calls ringing, and their group calls and live streams take them out (a host
stays). Each page then asks your server routes for new tokens and a new identity, and the tokens signed for the user
before now are refused, so your rules decide whether they come back: a user you signed out, whose session is gone, or
whom you blocked does not. A page hears `signed_out`.

The connection stays open, so the other plugins and products on it carry on.

In the packages: `realtime.user( id ).disconnect()`.

## Parameters

| Name | In | |
|---|---|---|
| `id` (required) | path | The user id, percent-encoded. |

## Answer

Done.

```json
{
  "ok": true
}
```

## Refusals

- **400**: `bad_request`, `bad_room`: the request is not one the API takes. `reserved`: an event name kept for the room itself.
- **401**: `missing_signature`, `stale_signature` (a clock off by more than 5 minutes), `unknown_site`, `bad_signature` (a wrong secret, or a body or path other than the one signed).
- **403**: `not_included`: your plan does not include it.

## Examples

`wordplus()` (in Go `app.Request()`) signs and sends the request: https://docs.wordplus.cloud/api/signing/ has it in each language.

**curl**

```bash
wordplus POST '/wordplus/realtime/users/42/disconnect'
```

**Node**

```js
await wordplus('POST', '/wordplus/realtime/users/42/disconnect');
```

**Python**

```python
wordplus("POST", "/wordplus/realtime/users/42/disconnect")
```

**PHP**

```php
wordplus('POST', '/wordplus/realtime/users/42/disconnect');
```

**Go**

```go
_, err := app.Request("POST", "/wordplus/realtime/users/42/disconnect", nil)
```

