User Login
POST
/auth/loginAuthenticate a user and return access and refresh token.
Request
Body Params application/json
email
string <email>
required
User's email address
password
string <password>
required
User's password
Example
{
"email": "user@example.com",
"password": "pa$$word"
}
Request samples
Responses
OK(200)
Unauthorized(401)
Validation Error(422)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
success
boolean
required
message
string
required
status_code
integer
required
data
object
required
user
object
required
name
string
required
email
string
required
tokens
object
required
tokens
object
required
access
string
required
refresh
string
required
ExampleOK
{
"success": true,
"message": "Login successful",
"status_code": 200,
"data": {
"user": {
"id": "01j62606a8bscpsjc7nc9tymr8",
"name": "Ms. Amara Kuhic",
"email": "owner_01j626061rcjm2npcn6p4hjaqh@example.com"
},
"tokens": {
"access": "5|BKNiTlB6e7VEtcLUn13kq4KOX9Cl1KRTvMhLxEA8d872a513",
"refresh": "6|oxs6YPCs4lpjSBvmRSebSwBHILh3ZUpWmjYoHAHW3f3fe789"
}
}
}
Last modified: 5 months ago