# prov.attest.devices.enrollment_challenge

prov.attest.devices.enrollment_challenge in Python SDK. A single-use challenge for a phone's key attestation before it enrolls.

## Signature

```python
prov.attest.devices.enrollment_challenge() -> Any
```

## Returns

`Any`

## HTTP operation

[`POST /v1/attest/devices/enrollment_challenge`](https://provenanceauth.com/docs/api/devices.md#post-v1-attest-devices-enrollment-challenge): Create an enrollment challenge for your device

## Errors

- [`attest_not_set_up`](https://provenanceauth.com/docs/platform/errors.md#attest_not_set_up)
- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

## Example

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/devices/enrollment_challenge`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/attest/devices/enrollment_challenge", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}).json()
```
