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

# Retrieve user information

You can use the `getUserInfo` method to retrieve various details about the user, such as their sign-in method, whether multi-factor authentication (MFA) is enabled, profile image, name, and other relevant information.

note

`getUserInfo()` throws an `Error` with code `NOUSERFOUND` when no active session exists. Always call it after `initialize()` completes and only when `getPrivateKey()` returns a non-empty string.

## Usage[​](#usage "Direct link to Usage")

```
val userInfo = web3Auth.getUserInfo()

```

## `UserInfo` Fields[​](#userinfo-fields "Direct link to userinfo-fields")

| Field                   | Type     | Description                                                                                          |
| ----------------------- | -------- | ---------------------------------------------------------------------------------------------------- |
| email                   | String   | Email address of the user. Empty string if not available.                                            |
| name                    | String   | Display name of the user. Empty string if not available.                                             |
| profileImage            | String   | URL of the user's profile image. Empty string if not available.                                      |
| authConnectionId        | String   | The auth connection ID (verifier name) used to sign in.                                              |
| groupedAuthConnectionId | String   | The grouped auth connection ID if aggregate verifiers are used. Empty string if not applicable.      |
| userId                  | String   | The user's unique ID within the auth connection (for example, email for email-based, sub for OAuth). |
| authConnection          | String   | The auth connection type used (for example, "google", "custom").                                     |
| dappShare               | String   | dapp share for custom verifiers. Empty string for default verifiers.                                 |
| idToken                 | String   | JWT issued by Web3Auth after authentication.                                                         |
| oAuthIdToken            | String   | JWT issued by the OAuth provider. Only present for custom verifiers.                                 |
| oAuthAccessToken        | String   | Access token issued by the OAuth provider. Only present for custom verifiers.                        |
| isMfaEnabled            | Boolean? | Whether the user has MFA enabled. null if the information is not available in the session.           |

### Interface[​](#interface "Direct link to Interface")

```
data class UserInfo(
    var email: String = "",
    var name: String = "",
    var profileImage: String = "",
    var groupedAuthConnectionId: String = "",
    var authConnectionId: String = "",
    var userId: String = "",
    var authConnection: String = "",
    var dappShare: String = "",
    var idToken: String = "",
    var oAuthIdToken: String = "",
    var oAuthAccessToken: String = "",
    var isMfaEnabled: Boolean? = null
)

```
