Skip to content
TALA
Esc
navigateopen⌘Jpreview

This endpoint is only to be used when a user wants to login

POST/api/auth/login
Request body
requiredapplication/json
emailstringrequired
passwordstringrequired
Responses
200OK
any
400Bad Request — message is one of: 'Invalid email and or password' | 'Please verify your email before logging in' (account not yet verified) | 'Your account has been suspended' (suspended account).
any
500Internal Server Error
any
Try it
Server
Bodyapplication/json
Request
curl -X POST "http://localhost:8000/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "string",
  "password": "string"
}'
Response
{
  "message": "You are logged-in successfully",
  "data": {
    "user": {
      "id": "CRa7Bk9x2Q",
      "fullName": null,
      "email": "example@mail.com",
      "role": "CONTENT_CREATOR",
      "accountStatus": "VERIFIED",
      "imageUrl": null
    },
    "token": {
      "accessToken": "**********",
      "refreshToken": "**********"
    }
  }
}