# Time someone out

`POST https://rest.wordplus.cloud/wordplus/realtime/streams/{name}/timeout`

Someone may not write in the chat for `seconds`, from 60 to 86,400, and goes on watching. The host is never timed
out (403 `host`).

In the packages: `realtime.stream( name ).timeout( user, seconds )`.

## Parameters

| Name | In | |
|---|---|---|
| `name` (required) | path | The stream name, percent-encoded: `show:mugs` is `show%3Amugs`. |

## Request

```json
{
  "user": "77",
  "seconds": 600
}
```

## Answer

When the timeout ends.

```json
{
  "ok": true,
  "until": 1791639000000
}
```

## Refusals

- **400**: `bad_request`, `bad_seconds`: out of range.
- **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 live streams. `host`: the host is never taken out.

## 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/streams/show%3Amugs/timeout' '{"user":"77","seconds":600}'
```

**Node**

```js
const { until } = await wordplus('POST', `/wordplus/realtime/streams/${encodeURIComponent('show:mugs')}/timeout`, { user: '77', seconds: 600 });
```

**Python**

```python
until = wordplus("POST", f"/wordplus/realtime/streams/{quote('show:mugs', safe='')}/timeout", {"user": "77", "seconds": 600})["until"]
```

**PHP**

```php
$until = wordplus('POST', '/wordplus/realtime/streams/'.rawurlencode('show:mugs').'/timeout', ['user' => '77', 'seconds' => 600])['until'];
```

**Go**

```go
answer, err := app.Request("POST", "/wordplus/realtime/streams/"+url.PathEscape("show:mugs")+"/timeout", map[string]any{"user": "77", "seconds": 600})
```

