-
Notifications
You must be signed in to change notification settings - Fork 0
User Login API
Tom Bloor edited this page Apr 22, 2017
·
1 revision
Last Updated 2017-04-22
Takes a application/json payload.
{
email : <login email>,
password : <login password>
}
Response code of 200 OK
{
success : true,
session_key : <session_key>
}
If something is missing from the request, or is invalid, you will get a response code of 400 BAD REQUEST and the following:
{
success : false,
message : <error message>
error : <error type>
}
If the username or email was incorrect, you will get a 401 UNAUTHORISED and the following:
{
success : false,
message : 'Email or password is invalid',
error : 'login_fail'
}
If there was a server error, you will get a `500 SERVER ERROR` and possibly the following:
{ success : false, message : 'An unknown error occurred when logging in' error : 'server_error' }