published
updated
  • Jul 30, 2008 10:27:53PM UTC
source uri
author
contributor

summary

content

Name   login
Description   Logs in a user into the system by validating username and password against the auth database
Accessible Via   /api/account/login
HTTP GET   True
HTTP POST   True
Special Headers   None
Login Required   False
Required Arguments   username : login username

password : password for user

Optional Arguments   rememberme : whether to persist user information in browser across sessions

domain : if provided the cookie domain is set to this value

Extra Arguments Ignored   True
Response Format   application/json
Notes   Sample response:
 {
"status":"200 OK",
"code":"/api/status/ok",
"messages": [{
"username": "$username$",
"message": "Login succeeded",
"code":"/api/status/ok/account/login"
"domain": "freebase.com"
}]
}

Sample error response:

 {
"status": "400 Bad request",
"code": "/api/status/error",
"messages": [
{
"info": {
"field": "username",
"value": null
},
"message": "Missing value",
"code": "/api/status/error/input/invalid"
},
{
"info": {
"field": "password",
"value": null
},
"message": "Missing value",
"code": "/api/status/error/input/invalid"
}
]
}
For additional information on using the callback parameter to generate a JSONP response, or using onsucceed and onfail to redirect to a URI template, see Common API Query Parameters.

Created by skud Dec 17, 2007
Last edited by philg Jul 30, 2008
View topic history »

Comments

There is no discussion about this document.

Start the Discussion »