Existing user login

POST /users/login

Login for existing user

application/json

Body Required

Credentials to use

  • user object Required
    Hide user attributes Show user attributes object
    • email string Required
    • password string(password) Required

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • user object Required
      Hide user attributes Show user attributes object
      • email string Required
      • token string Required
      • username string Required
      • bio string Required
      • image string Required
  • 401

    Unauthorized

  • 422 application/json

    Unexpected error

    Hide response attribute Show response attribute object
    • errors object Required
      Hide errors attribute Show errors attribute object
      • body array[string] Required
POST /users/login
curl \
 --request POST '/api/users/login' \
 --header "Content-Type: application/json" \
 --data '{"user":{"email":"string","password":"string"}}'
Request examples
{
  "user": {
    "email": "string",
    "password": "string"
  }
}
Response examples (200)
{
  "user": {
    "bio": "I work at State Farm.",
    "email": "jake@jake.jake",
    "image": null,
    "token": "jwt.token.here",
    "username": "jake"
  }
}
Response examples (422)
{
  "errors": {
    "body": [
      "string"
    ]
  }
}