Skip to content
Görkem Mülayim edited this page Jul 20, 2017 · 4 revisions

URL

/login

Method

POST

Data Params

{
  "username" : "x",    // String
  "password" : "x"     // String
}

Success Response

  • Code: 200 OK
  • Content:
{
  "status": "success",
  "user":
    {
      "name": "x",
      "surname": "x",
      "username": "x",
      "email": "x@x"
     }
}

Error Response

  • Code: 401 Unauthorized
  • Content:
{
  "status": "error",
  "message": "Invalid username or password!"
}

Sample Call

curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"username":"x","password":"x"}' https://not2do.herokuapp.com/login

Clone this wiki locally