Get User Info

The "Get User Info and Wallets" endpoint provides information about the authenticated user and their associated wallets. Use this endpoint to retrieve user details and wallet information.

Overview

Endpoint

  • Method: GET

  • URL: /user

Responses

Success (Code 200)

{
  "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)

{
  "code": 401,
  "message": "Please Authenticate"
}
  • Media Type: application/json

  • Example Value: An error response indicating unauthorized access.

Internal Server Error (Code 500)

{
  "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.

Last updated

Change request #16: lucenaluis137's Dec 28 changes