# A user

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

Whether a user of your app is online, since when they were last seen when they are not, and how many of their
connections your server vouched for are open now. A user hidden from the online list counts as offline.

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

## Parameters

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

## Answer

The user.

```json
{
  "ok": true,
  "user": {
    "id": "42",
    "online": true,
    "connections": 2
  }
}
```

## 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 GET '/wordplus/realtime/users/42'
```

**Node**

```js
const { user } = await wordplus('GET', '/wordplus/realtime/users/42');
```

**Python**

```python
user = wordplus("GET", "/wordplus/realtime/users/42")["user"]
```

**PHP**

```php
$user = wordplus('GET', '/wordplus/realtime/users/42')['user'];
```

**Go**

```go
answer, err := app.Request("GET", "/wordplus/realtime/users/42", nil)
```

