# prov.account.set_approval_channels

prov.account.set_approval_channels in Python SDK. Set the account default: `channels` (`web_push`, `email`, `text`, `phone_call`) and `mode` (`first_available` or `all`).

## Signature

```python
prov.account.set_approval_channels(channels: Any, mode: Optional[str] = …) -> Any
```

## Parameters

- `channels` (Any)
- `mode` (Optional[str], optional)

## Returns

`Any`

## HTTP operation

[`PUT /v1/account/approval_channels`](https://provenanceauth.com/docs/api/account.md#put-v1-account-approval-channels): Set the account default

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`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/account/approval_channels`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "mode": "first_available", "channels": ["text", "email"] }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.put(f"{api}/v1/account/approval_channels", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "mode": "first_available",
    "channels": [
        "text",
        "email"
    ]
}).json()
```
