> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delegated Access Setup

> Enable delegated access and configure your webhook endpoint and encryption keys.

## Enable and set defaults

In the Dynamic Console, navigate to [Embedded Wallets → Delegated Access](https://console.dynamic.xyz/dashboard/embedded-wallets/dynamic#embeddedwallets-delegated-access) and toggle on "Delegated Access".

Recommended defaults:

* Prompt users on sign in: ON (auto-prompt users on their next sign in)
* Require delegation: OFF (let users skip; enforce later in your app if needed)

## Provide encryption key (server)

Dynamic encrypts the delegated materials before sending to your server using a hybrid approach using RSA and AES. Provide your public key, or let Dynamic generate a key pair for you.

## Register your Delegated Access endpoint (server)

Provide a verified HTTPS URL that receives `wallet.delegation.created` (and `wallet.delegation.revoked`).

After adding the URL, we send a ping to verify reachability. View events in the Webhooks section of the Dynamic Console.

When a user approves delegation, your endpoint receives `wallet.delegation.created` with encrypted materials under `data`. Verify the signature and store securely. See Receiving for payload and decryption.

> [!NOTE]
>
> Before processing any webhook, verify signatures. Dynamic sends a signature in the `x-dynamic-signature-256` header. Compute HMAC-SHA256 of the raw request body with your webhook secret (from the webhook detail page in the Dynamic Console) and compare with the header value using a constant-time comparison. The payload you hash must match exactly as received.

Example (Node):

```typescript theme={"system"}
import * as crypto from "crypto";

export const verifySignature = ({
  secret,
  signature,
  payload,
}: { secret: string; signature: string; payload: any }) => {
  const payloadSignature = crypto
    .createHmac("sha256", secret)
    .update(JSON.stringify(payload))
    .digest("hex");
  const trusted = Buffer.from(`sha256=${payloadSignature}`, "ascii");
  const untrusted = Buffer.from(signature, "ascii");
  return crypto.timingSafeEqual(trusted, untrusted);
};
```

## Trigger delegation from your app

Once setup is complete, choose your SDK to learn how to trigger delegation and use delegated materials:

> [card] [React](https://docs.dynamic.xyz/docs/react/wallets/embedded-wallets/mpc/delegated-access/triggering-delegation.md)
>
> Trigger delegation and perform developer actions

> [card] [JavaScript](https://docs.dynamic.xyz/docs/javascript/wallets/embedded-wallets/mpc/delegated-access/triggering-delegation.md)
>
> Trigger delegation and perform developer actions

> [card] [React Native](https://docs.dynamic.xyz/docs/react-native/wallets/embedded-wallets/mpc/delegated-access/triggering-delegation.md)
>
> Trigger delegation and perform developer actions

> [card] [Swift](https://docs.dynamic.xyz/docs/swift/wallets/embedded-wallets/mpc/delegated-access/triggering-delegation.md)
>
> Trigger delegation and perform developer actions

> [card] [Kotlin](https://docs.dynamic.xyz/docs/kotlin/wallets/embedded-wallets/mpc/delegated-access/triggering-delegation.md)
>
> Trigger delegation and perform developer actions

> [card] [Flutter](https://docs.dynamic.xyz/docs/flutter/wallets/embedded-wallets/mpc/delegated-access/triggering-delegation.md)
>
> Trigger delegation and perform developer actions

> [card] [Unity](https://docs.dynamic.xyz/docs/unity/wallets/embedded-wallets/mpc/delegated-access/triggering-delegation.md)
>
> Trigger delegation and perform developer actions


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.