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

# Using Android SDK

Embedded Wallets provides a comprehensive set of functions to handle authentication, user management, and blockchain interactions in your Android applications. These functions allow you to implement features like user sign-in, Multi-Factor Authentication (MFA), private key retrieval, and Wallet Services with minimal effort. Each function is designed to handle a specific aspect of Embedded Wallets' functionality, making it easy to integrate into your Android projects.

## List of functions

tip

For detailed usage, configuration options, and code examples, refer to the dedicated documentation page for each function.

### Authentication functions

| Function Name                                                            | Description                                                                                                                                                      |
| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `initialize()`                                                           | Fetches the project configuration and restores an existing session. See [Initialize](/embedded-wallets/sdk/android/#3-initialize-the-embedded-wallets-instance). |
| [connectTo()](/embedded-wallets/sdk/android/usage/connect-to/)           | Signs in the user with the selected auth connection. Supports both PnP and SFA authentication modes.                                                             |
| [logout()](/embedded-wallets/sdk/android/usage/logout/)                  | Signs out the user from the current session.                                                                                                                     |
| [refreshSession()](/embedded-wallets/sdk/android/usage/refresh-session/) | Re-authorizes the current session without a new sign-in.                                                                                                         |

### User management functions

| Function Name                                                                              | Description                                                                                   |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| [getUserInfo()](/embedded-wallets/sdk/android/usage/get-user-info/)                        | Retrieves the authenticated user's information as a `UserInfo` object.                        |
| [getUserInfoAsync()](/embedded-wallets/sdk/android/usage/get-user-info/#getuserinfoasync)  | Retrieves `UserInfo` asynchronously, filling in `idToken` from the stored session.            |
| [getAccessToken()](/embedded-wallets/sdk/android/usage/session-tokens/#getaccesstoken)     | Retrieves the Auth access token for the current session.                                      |
| [getIdentityToken()](/embedded-wallets/sdk/android/usage/session-tokens/#getidentitytoken) | Retrieves the identity token (JWT) for the current session.                                   |
| `getWeb3AuthResponse()`                                                                    | Retrieves the full `Web3AuthResponse` from the current session, including keys and user info. |

### Private key functions

| Function Name                                                                          | Description                                                                     |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [getPrivateKey()](/embedded-wallets/sdk/android/usage/get-private-key/)                | Retrieve the user's secp256k1 private key for EVM-compatible chains.            |
| [getEd25519PrivateKey()](/embedded-wallets/sdk/android/usage/get-ed25519-private-key/) | Retrieve the user's ed25519 private key for chains like Solana, Near, Algorand. |

### Security functions

| Function Name                                                  | Description                                |
| -------------------------------------------------------------- | ------------------------------------------ |
| [enableMFA()](/embedded-wallets/sdk/android/usage/enable-mfa/) | Enables MFA for the user.                  |
| [manageMFA()](/embedded-wallets/sdk/android/usage/manage-mfa/) | Allows users to manage their MFA settings. |

### Wallet Services functions

| Function Name                                                                 | Description                                                                                            |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| [showWalletUI()](/embedded-wallets/sdk/android/usage/launch-wallet-services/) | Launches the prebuilt Wallet Services UI in WebView with automatic chain configuration from dashboard. |
| [request()](/embedded-wallets/sdk/android/usage/request/)                     | Opens prebuilt transaction screens for signing EVM transactions with simplified parameters.            |

## `getWeb3AuthResponse()`

The `getWeb3AuthResponse()` method returns the full `Web3AuthResponse` from the current session. This gives you direct access to all session data including keys, user info, signatures, and factor keys.

```kotlin
val response = web3Auth.getWeb3AuthResponse()

```

warning

`getWeb3AuthResponse()` throws an `Error` (`No user found, please login again!`) if no session has been restored or created. Call it only after `initialize()` or `connectTo()` completes successfully.

For most use cases, prefer the typed methods (`getPrivateKey()`, `getEd25519PrivateKey()`, `getUserInfo()`) which provide a more ergonomic API with clear error messages.
