> For the complete documentation index, see [llms.txt](https://xerial.gitbook.io/xerial-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xerial.gitbook.io/xerial-doc/~/changes/vTuPuavSUBXr6g7sVzr6/xerial-apis/wallet-api/wallet-management/get-user-info.md).

# Get User Info

## Overview

{% hint style="success" %}

### Endpoint

* **Method:** GET
* **URL:** `/user`
  {% endhint %}

### Responses

#### Success (Code 200)

```json
{
  "user": {
    "id": "5ebac534954b54139806c112",
    "email": "fake@example.com",
    "username": "fakename",
    "role": "player"
  },
  "wallets": [
    {
      "id": "656ab9db6a378b91ab1871be",
      "address": "0x8e9DD3c1Db3254d968967CbC367542C343273629",
      "chain": "ethereum",
      "custodial": true,
      "nonce": 769504,
      "user": "5ebac534954b54139806c112"
    }
  ]
}
```

* **`user`**: User information.
  * **`id`**: User ID.
  * **`email`**: User's email address.
  * **`username`**: User's username.
  * **`role`**: User's role.
* **`wallets`**: Array of user wallets.
  * **`id`**: Wallet ID.
  * **`address`**: Wallet address.
  * **`chain`**: Blockchain chain (e.g., Ethereum).
  * **`custodial`**: Indicates whether the wallet is custodial (true/false).
  * **`nonce`**: Wallet nonce.
  * **`user`**: User ID associated with the wallet.<br>
* **Media Type**: application/json
* **Example Value**: An object containing the all information about the user.

#### Unauthorized (Code 401)

```json
{
  "code": 401,
  "message": "Please Authenticate"
}
```

* **Media Type**: application/json
* **Example Value**: An error response indicating unauthorized access.

**Internal Server Error (Code 500)**

```json
{
  "error": "Internal Server Error"
}
```

* **Media Type**: application/json
* **Example Value**: An error response indicating an internal server error.

## Usage

1. **Send a GET request** to the `/user` endpoint to retrieve user information and associated wallets.
2. **Handle the response accordingly** based on success, unauthorized access or internal server error.

**Note:** Ensure the user is authenticated before making the request.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xerial.gitbook.io/xerial-doc/~/changes/vTuPuavSUBXr6g7sVzr6/xerial-apis/wallet-api/wallet-management/get-user-info.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
