# 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.\\

* **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.
