---
updatedAt: 2025-07-26T15:15:54.000Z
agentTools:
  projectIndex: https://docs.metakeep.xyz/llms.txt
---

# Get Wallet

The `getWallet` function in the SDK returns the `public wallet` of the user.  The user might be asked to **go through a verification process** before the wallet is returned.

This function returns the same response as the [`/v3/getWallet`](https://docs.metakeep.xyz/reference/v3getwallet)  API endpoint.

```json Sample Response
{
  "status": "SUCCESS",
  "wallet": {
    "ethAddress": "0xD570518061287E79f137fca98D56902e086f95CB",
    "solAddress": "B4H5koiRxUuGz7YKALucvxUAc81k4b9Xf3aGTFXQ42mF",
    "eosAddress": "EOS8cfYwFefRy1pEeiWhvP5K5H3TV9514jyvuYeHEz1sqXbywGc2f"
  }
}
```

> 📘 Use [`/v3/getWallet`](https://docs.metakeep.xyz/reference/v3getwallet)  API endpoint instead
>
> For lower user friction, we recommend using the [`/v3/getWallet`](https://docs.metakeep.xyz/reference/v3getwallet) API endpoint instead of the SDK. The [`/v3/getWallet`](https://docs.metakeep.xyz/reference/v3getwallet) API endpoint doesn't require user verification.
>
> **SDK`getWallet` will always require user verification unless you [provide a user](https://docs.metakeep.xyz/reference/mobile-sdk-101#initializing-the-library) when initializing the SDK**

## Calling `getWallet`

```kotlin getWallet Android - Kotlin
sdk.getWallet(
    Callback(
        onSuccess = { response: JsonResponse ->
            Log.d("onSuccess", response.toString())
        },
        onFailure = { error: JsonResponse ->
            Log.d("onFailure", error.toString())
        },
    ),
)

```
```swift getWallet iOS - Swift
sdk.getWallet(
  callback: Callback(
    onSuccess: { (result: JsonResponse) in
      print("onSuccess")
      print(result.description)
    },
    onFailure: { (error: JsonResponse) in
      print("onFailure")
      print(error.description)
    }
  )
)
```
```javascript getWallet React Native
await sdk.getWallet();
```
```javascript getWallet Flutter
await sdk.getWallet();
```

On success, the callback `onSuccess` or the `Promise resolve` function is called with the wallet as a `JsonResponse` object. This is what the data looks like:

```json Successful response from SDK
{
  "status": "SUCCESS",
  "wallet": {
    "ethAddress": "0xD570518061287E79f137fca98D56902e086f95CB",
    "solAddress": "B4H5koiRxUuGz7YKALucvxUAc81k4b9Xf3aGTFXQ42mF",
    "eosAddress": "EOS8cfYwFefRy1pEeiWhvP5K5H3TV9514jyvuYeHEz1sqXbywGc2f"
  }
}
```

## Error status

Callback `onFailure` or the `Promise reject` function is called when the user cancels the operation or if there's an error. The error object contains a status field which is a string indicating the status of the operation. Here's what the error object looks like:

```json Error object
{
  status: "USER_REQUEST_DENIED"
}
```

Here's a table of all possible error status returned by the SDK

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Status
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        USER\_REQUEST\_DENIED
      </td>

      <td>
        The user has denied the get wallet request.
      </td>
    </tr>

    <tr>
      <td>
        INVALID\_EMAIL
      </td>

      <td>
        The SDK has been initialized with an invalid user email.
      </td>
    </tr>

    <tr>
      <td>
        APP\_ID\_REQUIRED
      </td>

      <td>
        No app-id was provided when initializing the SDK.\
        You can find the app id in the MetaKeep Developer Console.
      </td>
    </tr>

    <tr>
      <td>
        APP\_NOT\_FOUND
      </td>

      <td>
        The provided app-id is invalid.\
        You can find the correct app-id in the MetaKeep Developer Console.
      </td>
    </tr>

    <tr>
      <td>
        SOMETHING\_WENT\_WRONG
      </td>

      <td>
        An unknown error occurred.\
        Please get in touch with us if you continue seeing this error.
      </td>
    </tr>
  </tbody>
</Table>

© Copyright 2024, Passbird Research Inc.