# Take someone out of a room

`POST https://rest.wordplus.cloud/wordplus/realtime/rooms/{name}/kick`

Takes every connection of a user out of the room at once, and refuses the room tokens signed for them before
now. Move the key of the room on too ([sealing](/api/sealing/#taking-a-key-back)), so what it carries next stays
sealed from them.

In the packages: `realtime.in( room ).kick( user )`.

## Parameters

| Name | In | |
|---|---|---|
| `name` (required) | path | The room name, percent-encoded: `order:42` is `order%3A42`. |

## Request

```json
{
  "user": "43"
}
```

## 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/rooms/chat%3A34%3A42/kick' '{"user":"43"}'
```

**Node**

```js
await wordplus('POST', `/wordplus/realtime/rooms/${encodeURIComponent('chat:34:42')}/kick`, { user: '43' });
```

**Python**

```python
wordplus("POST", f"/wordplus/realtime/rooms/{quote('chat:34:42', safe='')}/kick", {"user": "43"})
```

**PHP**

```php
wordplus('POST', '/wordplus/realtime/rooms/'.rawurlencode('chat:34:42').'/kick', ['user' => '43']);
```

**Go**

```go
_, err := app.Request("POST", "/wordplus/realtime/rooms/"+url.PathEscape("chat:34:42")+"/kick", map[string]any{"user": "43"})
```

