Skip to main content

Overview

The Kotlin SDK allows you to customize the sub-organization creation process in your Android application. This is useful if you want to create a more tailored experience for your users, including automatically creating wallets, having multiple authentication methods, default usernames, and more. These can be individually configured for each authentication method.

Customization

You can customize the createSuborgParams object inside the authConfig object in the TurnkeyContext.init configuration. This object allows you to set various parameters for the sub-organization creation process. Each authentication method can have its own set of parameters. For example, you can set a different default userName for emailOtpAuth and passkeyAuth methods, or create different wallets for each authentication method.
Or, you can set the same parameters for all authentication methods:
The complete list of customizable parameters:

CreateSubOrgParams

*“Required” depends on flow:
  • Email OTP → userEmail + verificationToken
  • SMS OTP → userPhoneNumber + verificationToken
  • Passkey → authenticators (or you’ll register after)
  • OAuth → oauthProviders

CreateSubOrgAuthenticator

Represents a passkey/WebAuthn authenticator to attach at sub-org creation.

CreateSubOrgApiKey

Creates an API key scoped to the new sub-org.

CustomWallet

Create a wallet (container) plus one or more accounts at signup.

Next steps

Now that you know how to customize the sub-orgs created in your Android application, check out the Advanced API Requests guide to learn how to make advanced API requests to Turnkey’s infrastructure. This will help you build more complex features and functionalities in your app that go beyond what is included as helper functions in the SDK.