GetUser

GET /users

Retrieve the information of the user

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • _id string Required

      Unique identifier for the given user.

    • firstName string Required

      Minimum length is 2, maximum length is 30.

    • email string(email) Required
    • username string Required

      Unique identifier for the given user.

    • password string(password) Required
    • lastName string Required

      Minimum length is 2, maximum length is 30.

    • dateOfBirth string(date-time) Required
    • emailVerified boolean

      Set to true if the user's email has been verified.

    • createDate string(date)

      The date that the user was created.

    • location string
    • image string
  • 401

    Unauthorized

  • 500

    Internal Server Error

GET /users
curl \
 --request GET 'https://garden-to-yours.herokuapp.com/users' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "_id": "string",
  "firstName": "string",
  "email": "hello@example.com",
  "username": "string",
  "password": "string",
  "lastName": "string",
  "dateOfBirth": "2000-08-24T00:00:00.000Z",
  "emailVerified": true,
  "createDate": "2025-05-04",
  "location": "string",
  "image": "string"
}