# `Apple.DeviceCheckAPI`
[🔗](https://github.com/cozy-elixir/apple/blob/v0.6.0/lib/apple/device_check_api.ex#L1)

Utilities for [DeviceCheck API](https://developer.apple.com/documentation/devicecheck).

DeviceCheck allows you to validate device tokens and query/update device state
bits to detect fraudulent activity on iOS, tvOS, and macOS devices.

# `build_auth_token!`

```elixir
@spec build_auth_token!(
  Apple.Types.DeviceCheck.issuer_id(),
  Apple.Types.DeviceCheck.key_id(),
  Apple.Types.DeviceCheck.private_key()
) :: String.t()
```

Builds a token to authorize DeviceCheck HTTP requests.

After building it, use it in the `Authorization` header like this:

```text
Authorization: Bearer <JWT>
```

## More resources

  * [DeviceCheck API documentation](https://developer.apple.com/documentation/devicecheck)
  * [Accessing and Modifying Per-Device Data](https://developer.apple.com/documentation/devicecheck/accessing_and_modifying_per-device_data)

# `development_url`

```elixir
@spec development_url() :: String.t()
```

Returns the DeviceCheck API base URL for development.

# `production_url`

```elixir
@spec production_url() :: String.t()
```

Returns the DeviceCheck API base URL for production.

---

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