> For the complete documentation index, see [llms.txt](/llms.txt).

# Key export settings

The key export setting controls whether your dapp can retrieve a user's private key programmatically through the Embedded Wallets SDK.

![Key export settings](/assets/images/project-settings-advanced-e73a8c5fab365a6864e1ecd8c76466a4.png) 

## Export types[​](#export-types "Direct link to Export types")

| Type                              | Always available | Configurable                         |
| --------------------------------- | ---------------- | ------------------------------------ |
| Manual (wallet UI)                | Yes              | No — always on                       |
| Programmatic (private_key method) | No               | Yes — toggle in **Project Settings** |

Manual export is always available through the built-in wallet interface. Users initiate it themselves; your dapp has no control over it.

## Enable or disable programmatic export[​](#enable-or-disable-programmatic-export "Direct link to Enable or disable programmatic export")

1. Navigate to **Project Settings** → **Advanced** → **Key export**.
2. Toggle **Enable key export**.
3. Save to apply.

When enabled, your dapp can retrieve the user's private key using the `private_key` JSON-RPC method on the `auth` adapter:

```
const privateKey = await web3auth.provider.request({
  method: 'private_key',
})

```

When disabled, calling `private_key` throws an error. Manual export through the wallet UI remains available.

danger

Never store or transmit a private key in plaintext. Retrieve it only when necessary, process it immediately, and clear it from memory afterward.

## When to disable programmatic export[​](#when-to-disable-programmatic-export "Direct link to When to disable programmatic export")

Disable programmatic key export for consumer-facing dapps, dapps handling high-value assets, and regulated financial services. Most dapps do not need it — signing transactions through `web3auth.provider` does not require key export.

## Next steps[​](#next-steps "Direct link to Next steps")

- [Session management](/embedded-wallets/dashboard/advanced/session-management/) — control session lifetime
- [User details in ID token](/embedded-wallets/dashboard/advanced/user-details/) — control what PII appears in JWT tokens
- [Project settings](/embedded-wallets/dashboard/project-settings/) — general project configuration
