# `ExStreamClient.Operations.Chat.Users`
[🔗](https://github.com/Tango-Tango/ex_stream_client/blob/main/lib/ex_stream_client/operations/chat/users.ex#L1)

Modules for interacting with the `chat/users` group of Stream APIs

API Reference: https://getstream.github.io/protocol/?urls.primaryName=Chat%20v2

### Shared options
All functions in this module accept the following optional parameters:

 * `api_key` - API key to use. If not provided, the default key from config will be used
 * `authenticate_as_user` - User id to authenticate. If not provided, the server key will be used
 * `api_key_secret` - API key secret to use. If not provided, the default secret from config will be used
 * `endpoint` - endpoint to use. If not provided, the default endpoint from config will be used
 * `client` - HTTP client to use. Must implement `ExStreamClient.Http.Behavior`. Defaults to `ExStreamClient.Http`
 * `req_opts` - all of these options will be forwarded to req. See `Req.new/1` for available options

# `shared_opts`

```elixir
@type shared_opts() :: [
  api_key: String.t(),
  api_key_secret: String.t(),
  authenticate_as_user: String.t(),
  client: module(),
  endpoint: String.t(),
  req_opts: keyword()
]
```

# `send_user_custom_event`

```elixir
@spec send_user_custom_event(
  String.t(),
  ExStreamClient.Model.SendUserCustomEventRequest.t(),
  shared_opts()
) :: {:ok, ExStreamClient.Model.Response.t()} | {:error, any()}
```

Sends a custom event to a user

### Sends events:
- `*`

### Required Arguments:
- `user_id`
- `payload`: `Elixir.ExStreamClient.Model.SendUserCustomEventRequest`
### Optional Arguments:
- All options from [Shared Options](#module-shared-options) are supported.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
