Skip to main content

Users

Get registered users

Tip

Ensure you have completed the configuration steps Here


Get all registered users both verified and unverified accounts

Get all users​

Request​

GET
http://localhost:5501/api/v1/auth/

Response​

{
"status": "String",
"results": "Number",
"data": "Array",
}

Response Validation​

  1. status - response status
  1. results - Total records
  1. data - Array containing all users

Example​

Response​

{
"status": "success",
"results": 2,
"data": [
{
"_id": "629ad74878103d4e4a74e9e6",
"photo": "629ad74878103d4e4a74e9e6-1658134017506.jpeg",
"name": "John Doe",
"email": "user1@example.com",
"identifier": "email",
"phone": "0718xxxxxxx",
"isVerified": true,
"isActive": true,
"createdby": "techkey",
"date": "2022-06-04T03:53:06.432Z",
"__v": 10,
"lastLogin": "2022-06-25T05:26:54.806Z",
"bio": "Developer"
},
{
"_id": "62d4e6f6167f537cf7db8c37",
"photo": "default.jpg",
"name": "Mary Doe",
"email": "user2@example.com",
"identifier": "email",
"phone": "",
"bio": "",
"isVerified": false,
"isActive": true,
"createdby": "techkey",
"date": "2022-07-18T04:48:42.849Z",
"__v": 0
}

]
}

Get one user​

Request​

GET
http://localhost:5501/api/v1/auth/<USER_ID>

Response​

{
"status": "String",
"data": "Object",
}

Response Validation​

  1. status - response status
  1. data - User details

Example​

Response​

{
"status": "success",
"data": {
"_id": "629ad74878103d4e4a74e9e6",
"photo": "629ad74878103d4e4a74e9e6-1658134017506.jpeg",
"name": "John Doe",
"email": "user1@example.com",
"identifier": "email",
"phone": "0718xxxxxxx",
"isVerified": true,
"isActive": true,
"createdby": "techkey",
"date": "2022-06-04T03:53:06.432Z",
"__v": 10,
"lastLogin": "2022-06-25T05:26:54.806Z",
"bio": "Developer"
}
}