Juman Project
  1. Auth
Juman Project
  • Auth
    • register
      POST
    • login
      POST
    • forgot-password
      POST
    • reset-password
      POST
    • logout
      POST
  • Events
    • user register to event
      POST
    • get all events
      GET
    • get single event
      GET
    • create event
      POST
    • update event
      PUT
    • delete event
      DELETE
  • Courses
    • recorded course
      • create recorded course
      • get all recorded courses
      • get single recorded course
      • delete recorded course
      • update recorded course
      • book a recorded course
      • verify payment
    • in person course
      • create in-person courses
      • get all in-person courses
      • get single in-person course
      • delete in-person course
      • update in-person course
      • book an in-person course
      • verify payment
    • get all courses
      GET
    • get single course
      GET
    • update course
      PUT
  • Consultations
    • create consultation
      POST
    • book a consultation
      POST
    • verify payment
      GET
    • all payments
      GET
    • payments history (for single user)
      GET
    • Get Available Consultations
      GET
  • Users
    • get user
      GET
    • me
      GET
    • update user
      PUT
    • update user password
      PUT
    • get all users
      GET
    • delete user
      DELETE
    • get user content
      GET
  • Contact
    • contact form
  • FAQs
    • get all faqs (admin)
    • get all faqs (users)
    • create faq
    • update faq
    • delete faq
    • toggle status
  • Podcasts
    • get all podcasts
    • create podcast
    • update podcast
    • delete podcast
    • get all podcasts (admin)
    • get single podcast
    • get single podcast
  1. Auth

login

POST
/api/auth/login

Login API#

This API endpoint is used to authenticate and log in a user.

Request Body#

email (text, required): The email of the user.
password (text, required): The password of the user.

Response#

status (string): The status of the response.
data (object):
user (object):
_id (string): The unique identifier of the user.
fullName (string): The full name of the user.
email (string): The email of the user.
phoneNumber (string): The phone number of the user.
role (string): The role of the user.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "abdullatifjr002@gmail.com",
    "password": "123123123"
}'
Response Response Example
{
    "status": "success",
    "message": "Logged in successfully",
    "data": {
        "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2ODAyYTViZTdjZjA5NTNlOGNkOTM0MjIiLCJyb2xlIjoidXNlciIsImlhdCI6MTc0NzU1OTkxMywiZXhwIjoxNzQ3NTYwODEzfQ.WEkSsG3MFaF9eGdBwiZ5aqAwwUs759zEuwbMer0-cd0",
        "user": {
            "_id": "6802a5be7cf0953e8cd93422",
            "fullName": "Abdullatif",
            "email": "Hello@gmail.com",
            "role": "user"
        }
    }
}

Request

Body Params application/json

Examples

Responses

🟢200login
application/json
Body

Modified at 2025-07-27 21:49:07
Previous
register
Next
forgot-password
Built with