Login User

Last edit:  Sep 03, 2018

Contributors:  pavelloz

To login user, send a POST request to /api/sessions

HTTP request

POST /api/sessions

Parameters

Parameter Type Description Required Notes
form_configuration_name String Name of the form configuration Required
form SessionForm User email and password Required

Session Parameters

Parameter Type Description Required Notes
email String User's email address Required
password String User password Required

Example request

"authorization: Token token=[YOUR API TOKEN]"
"accept: application/json"
"content-type: application/json"

{
  "form_configuration_name": "reference_rest_api_create_sessions",
  "form": {
    "email": "example1@example.com",
    "password": "somepassword"
  }
}
Element Type Description Required?
form_configuration_name String Name of the defined FormConfiguration Required
form SessionForm User email and password Required

Example response

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{}
Element Type Description
[…] […] […]

Error and Status Codes

Code Message Meaning
201 Created Resource was created
401 Unathorized Invalid Authentication
406 Not Acceptable Wrong parameters passed
422 Unprocessable Entity Wrong values, not matched validations