1. Auth
E-Learning
  • Auth
    • Register
      POST
    • Confirm Email
      POST
    • Resend Confirmation Email
      POST
    • Login
      POST
    • Google Login
      GET
    • Google Login By Id Token
      POST
    • Forget Password
      POST
    • Reset Password
      POST
    • Refresh Token
      POST
    • Revoke Refresh Token
      POST
  • Account
    • Get User
      GET
    • Update User
      PUT
    • Delete User
      DELETE
    • Change Password
      PUT
    • Uploade User Image
      POST
    • Delete User Image
      DELETE
    • Become Instructor
      POST
    • Get Users To Admin
      GET
    • Delete User By Admin
      DELETE
    • Add User To Role
      POST
    • Remove User From Role
      DELETE
    • Get instructor Requests
      GET
    • Approve Instructor Request
      PATCH
    • Reject Instructor Request
      PATCH
  • Course
    • Anonymous
      • Get All Courses
      • Get Course By Id
    • Instructor
      • Get Instructor Courses
      • Get Instructor Course By Id
      • Create Course
      • Publish Course
      • Unpublish Course
      • Update Course Info
      • Delete Course
      • Add Thumbnail
      • Delete Thumbnail
    • Admin
      • Get All Courses To Admin
      • Get Course By Id To Admin
      • Delete Course By Admin
      • Restore Soft Deleted Course By Admin
  • Chapter
    • Anonymous
      • Get All Course Chapters
      • Get Chapter
    • Instructor
      • Get All Chapters To Instructor
      • Get Chapter To Instructor
      • Create Chapter
      • Update Chapter
      • Reorder All Chapters
      • Delete Chapter
      • Add Chapter Image
      • Delete Chapter Image
    • Admin
      • Get All Chapters To Admin
      • Get Chapter To Admin
  • Lesson
    • Anonymous
      • Get All Lessons
      • Get Lesson
    • Instructor
      • Get All Lessons To Instructor
      • Get Lesson To Instructor
      • Create Lesson In Chapter
      • Upload Lesson Video
      • Delete Lesson Video
      • Update Lesson
      • Delete Lesson
      • Reorder All Lessons in Chapter
    • Admin
      • Get All Lessons To Admin
      • Get Lesson To Admin
  • Cart
    • Get Cart For User
    • Add Course In Cart
    • Delete Item From User Cart
  • Payment
    • Create Payment Intention
    • Get Payment History
  • Enrollment
    • Enrolle In Course
    • Unenroll From Course
    • Get Enrolled Course Details
    • Get Student Courses
    • Get Enrolled Students in Course
  • Learn
    • Get Student Course Learn
    • Mark Lesson Complete
  • Quiz
    • Create Quiz
    • Get Quiz
    • Update Quiz Info
    • Delete Quiz
    • Active Quiz
    • Deactive Quiz
  • Question
    • Question Types
    • Create Question
    • Get Question
    • Update Question
    • Delete Question
    • Reorder Questions
  • Quiz Attempt
    • Start Quiz Attempt
    • Get Active Quiz Attempt
    • Submit Quiz Attempt
    • Get Quiz Attempt Result
    • Get Quiz Attempts History
  1. Auth

Login

POST
http://e-learning-platform.tryasp.net/api/auth/login
Authorized User

Request

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

🟠400Invalid credentials
🟠400Email not confirmed
🟠400Password reset in progress
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'http://e-learning-platform.tryasp.net/api/auth/login' \
--header 'Content-Type: application/json' \
--data '{
    "email": "",
    "password": ""
}'
Response Response Example
200 - Login
{
    "userName": "student_khaled",
    "email": "khaled.student@gmail.com",
    "roles": [
        "Student"
    ],
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOiJiODljZDM3ZC1iZDlmLTQwMzMtOWNkOS0zMWI1ZDFmOGMxYTMiLCJVc2VyTmFtZSI6InN0dWRlbnRfa2hhbGVkIiwiRmlyc3ROYW1lIjoiS2hhbGVkIiwiTGFzdE5hbWUiOiJTYXllZCIsIkVtYWlsIjoia2hhbGVkLnN0dWRlbnRAZ21haWwuY29tIiwiUGhvbmUiOiIiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJTdHVkZW50IiwiZXhwIjoxNzg0NzI3MzI0LCJpc3MiOiJodHRwOi8vZS1sZWFybmluZy1wbGF0Zm9ybS50cnlhc3AubmV0IiwiYXVkIjoibG9jYWxob3N0OjMwMDAifQ.A5MtMJBdhwBcqmJkPo5J2ai0-OBlF5YIEfxobpCB6R8",
    "tokenExpiration": "2026-07-22T15:35:24+02:00",
    "refreshToken": "cbq5%jkkn81NhLAeR/bJXJjesarlhlOpYkAUOLmzJ89mBUxakth2tBF0T4veglfeMYqLvskoHbzHYxn7Ut9A0g==",
    "refreshTokenExpiration": "2026-07-28T15:35:24.9566436+02:00"
}
Modified at 2026-07-21 13:38:05
Previous
Resend Confirmation Email
Next
Google Login
Built with