# `AttestoClient.DynamicClientRegistration`
[🔗](https://github.com/XukuLLC/attesto_client/blob/v2.26.0/lib/attesto_client/dynamic_client_registration.ex#L1)

Minimal RFC 7591 Dynamic Client Registration client.

`register/3` sends caller-supplied client metadata to a registration endpoint
and returns the validated registration response. It deliberately does not
decide when dynamic registration is appropriate, choose client metadata, or
persist the resulting credentials; those are application or protocol-profile
policy decisions.

The endpoint is subject to the same outbound screening, DNS pinning,
deadline, redirect refusal, response-size limit, JSON media-type check, and
duplicate-member rejection as the package's other OAuth HTTP operations.
RFC 7591 requires HTTP 201 for a successful registration.

# `error`

```elixir
@type error() :: :invalid_client_metadata | :invalid_registration_response | term()
```

# `register`

```elixir
@spec register(String.t(), map(), keyword()) :: {:ok, map()} | {:error, error()}
```

Register `client_metadata` at `endpoint`.

Metadata keys must be non-empty strings. Transport options are the standard
AttestoClient outbound options accepted by OAuth endpoint requests. When the
endpoint came from authorization-server metadata, pass that server's exact
`:issuer`; this binds any loopback development exception to the issuer rather
than to the endpoint it advertised.

---

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