Turnkey organization setup

To start, you must create a Turnkey organization via the Turnkey dashboard. The steps are described in the Account Setup section. For this setup, we will use Turnkey’s Auth Proxy to handle authentication. You can enable and configure this through the Turnkey dashboard.
1

Enable auth proxy

Navigate to the Auth section in the Turnkey dashboard and enable the Auth Proxy.Auth Proxy toggle
2

Customize auth methods

You can choose which auth methods to enable and customize various options from this screen. For this quickstart, let’s enable email OTP and passkeys. When you’re done, click Save.Auth Proxy options
3

Finish up

Once you’re finished with the auth proxy setup, copy your Auth Proxy Config ID and your Organization ID from the dashboard.Auth Proxy Config idOrganization idThese values will be required to configure the SDK in your app.

Installation

Install the Turnkey Core SDK into your project:
npm install @turnkey/core

Client initialization

Unlike @turnkey/react-wallet-kit, @turnkey/core doesn’t provide a React provider or hooks — you work directly with the TurnkeyClient. Here’s a minimal setup example:
import { TurnkeyClient, TurnkeyError } from "@turnkey/core";

const client = new TurnkeyClient({
  organizationId: "YOUR_ORGANIZATION_ID",
  authProxyConfigId: "YOUR_AUTH_PROXY_CONFIG_ID", // Can be omitted if you don't use the Auth Proxy
});

// Initialize the client. Required for async initialization.
await client.init();

Optional configuration

The client accepts optional configuration for passkeys and external browser wallets. If omitted, those features will not be initialized.

Passkeys

const client = new TurnkeyClient({
  organizationId: "...",
  authProxyConfigId: "...",
  passkeyConfig: {
    rpId: "example.com", // Required for React Native
    timeout: 60000, // Default: 5 minutes
    userVerification: "preferred",
  },
});
All fields are optional in web environments. On React Native, rpId is required.

External browser wallets

const client = new TurnkeyClient({
  organizationId: "...",
  authProxyConfigId: "...",
  walletConfig: {
    chains: {
      ethereum: {
        native: true,
        walletConnectNamespaces: ["eip155:1"], // Ethereum mainnet
      },
      solana: {
        native: true,
        walletConnectNamespaces: ["solana:mainnet"],
      },
    },

    // Optional: Configure WalletConnect. WalletConnect is used for connecting wallets from mobile devices.
    walletConnect: {
      projectId: "YOUR_PROJECT_ID",
      appMetadata: {
        name: "My App",
        description: "My dApp powered by Turnkey",
        url: "https://example.com",
        icons: ["https://example.com/icon.png"],
      },
    },
  },
});