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

# Getting started with Turnkey's Kotlin SDK

> Learn how to set up Turnkey in your Android application. This page will guide you through the initial setup, including enabling Turnkey's Auth Proxy, installing the Kotlin SDK, and configuring your app.

## Turnkey organization setup

To start, you must create a Turnkey organization via the [Turnkey dashboard](https://app.turnkey.com). The steps to do so are described in the [Account Setup](/getting-started/quickstart) section.

For this setup, we will be using Turnkey's Auth Proxy to handle authentication. We can enable and configure this through the Turnkey dashboard.

<Steps>
  <Step title="Enable Auth Proxy">
    Navigate to the **Wallet Kit** section in the Turnkey Dashboard and enable the
    **Auth Proxy**.

    <img src="https://mintcdn.com/turnkey-0e7c1f5b/b0fOk4Hn036S1cMU/images/getting-started/img/quickstart/auth-proxy-toggle.png?fit=max&auto=format&n=b0fOk4Hn036S1cMU&q=85&s=ea9ead0f15628dcdde3ae464b0b05893" alt="Auth Proxy toggle" width="1118" height="198" data-path="images/getting-started/img/quickstart/auth-proxy-toggle.png" />
  </Step>

  <Step title="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**.

    <img src="https://mintcdn.com/turnkey-0e7c1f5b/b0fOk4Hn036S1cMU/images/getting-started/img/quickstart/auth-proxy-options.png?fit=max&auto=format&n=b0fOk4Hn036S1cMU&q=85&s=9cb6b26d526e466318ce9e51982103b8" alt="Auth Proxy options" width="882" height="1137" data-path="images/getting-started/img/quickstart/auth-proxy-options.png" />

    <img src="https://mintcdn.com/turnkey-0e7c1f5b/b0fOk4Hn036S1cMU/images/getting-started/img/quickstart/wallet-kit-options.png?fit=max&auto=format&n=b0fOk4Hn036S1cMU&q=85&s=62f63ee460e410842f8e4db26feb92fd" alt="Wallet kit options" width="882" height="868" data-path="images/getting-started/img/quickstart/wallet-kit-options.png" />
  </Step>

  <Step title="Finish up">
    Once you're finished with the auth proxy setup, you can copy the **auth proxy config ID**

    <img src="https://mintcdn.com/turnkey-0e7c1f5b/b0fOk4Hn036S1cMU/images/getting-started/img/quickstart/auth-proxy-id.png?fit=max&auto=format&n=b0fOk4Hn036S1cMU&q=85&s=ded58859ffae79a0a8a35265c0f9e2a4" alt="Auth Proxy Config id" width="487" height="96" data-path="images/getting-started/img/quickstart/auth-proxy-id.png" />

    and your **organization ID** from the dashboard.

    <img src="https://mintcdn.com/turnkey-0e7c1f5b/5sbBAG4Yfd-9P7Ds/images/getting-started/img/quickstart/org-id.png?fit=max&auto=format&n=5sbBAG4Yfd-9P7Ds&q=85&s=3502928686ad2e72458b6262d69e5095" alt="Organization id" width="1288" height="532" data-path="images/getting-started/img/quickstart/org-id.png" />

    These will be used in the next steps to configure your app.
  </Step>
</Steps>

## Install the Kotlin SDK

To install the Turnkey Kotlin SDK, add the following dependency to your `build.gradle` file:

```kotlin theme={"system"}
dependencies {
    implementation("com.turnkey:sdk-kotlin:<version>")
}
```

Replace `<version>` with the latest version of the SDK, which you can find on [Maven Central](https://central.sonatype.com/artifact/com.turnkey/sdk-kotlin).

## Configure your application

In order to catch OAuth and Passkey redirects, you'll need to add the `OAuthRedirectActivity` to your `AndroidManifest.xml`:

```xml theme={"system"}
<activity
    android:name="com.turnkey.core.OAuthRedirectActivity"
    android:launchMode="singleTop"
    android:noHistory="true"
    android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="<your-app-scheme>" />
    </intent-filter>
</activity>
```

> To configure your app scheme, choose a unique string (e.g., `com.yourcompany.yourapp`) and replace `<your-app-scheme>` with it. Make sure to use the same app scheme when initializing the Turnkey SDK.

Create a `TurnkeyConfig` and initialize the singleton `TurnkeyContext` from your `Application`.

```kotlin theme={"system"}
import android.app.Application
import com.turnkey.core.TurnkeyContext
import com.turnkey.models.AuthConfig
import com.turnkey.models.CreateSubOrgParams
import com.turnkey.models.CustomWallet
import com.turnkey.models.MethodCreateSubOrgParams
import com.turnkey.models.TurnkeyConfig
import com.turnkey.types.V1AddressFormat
import com.turnkey.types.V1Curve
import com.turnkey.types.V1PathFormat
import com.turnkey.types.V1WalletAccountParams

class App : Application() {
    override fun onCreate() {
        super.onCreate()

        TurnkeyContext.init(
            app = this,
            config = TurnkeyConfig(
                authProxyConfigId = "<your-auth-proxy-config-id>",
                organizationId = "<your-parent-organization-id>",
                appScheme = "<your-app-scheme>", // optional, used for OAuth redirects
                authConfig = AuthConfig(
                    rpId = "<your-rp-id>" // optional relying party ID for passkeys
                )
            )
        )
    }
}
```

> Replace `<your-auth-proxy-config-id>`, `<your-parent-organization-id>`, `<your-app-scheme>`, and `<your-rp-id>` with the appropriate values from your Turnkey dashboard and app configuration.

You can now start using the Turnkey Kotlin SDK in your application!

***

Optional client readiness:

```kotlin theme={"system"}
lifecycleScope.launch {
    TurnkeyContext.awaitReady()
    // client available via TurnkeyContext.client
}
```

***

## Next steps

Now that you have set up the Turnkey Kotlin SDK in your application, you can explore the following guides to implement authentication and wallet functionalities:

* [Authentication Guide](/sdks/kotlin/authentication)
* [Wallet Management Guide](/sdks/kotlin/wallet-management)
* [Signing Guides](/sdks/kotlin/signing)
