Login user into the system
Collect a Bearer token for a registered user. Token lifetime - 2 hours.
Query Parameters
- username string required
Login
- password string required
MD5 hash of the password for login (e. g. 123456=E10ADC3949BA59ABBE56E057F20F883E)
Responses
- 200
- 400
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
- token string
Bearer token
- account_type string
Account type affects permissions the user has
{
"token": "93144b288eb1fdccbe46d6fc0f241a51766ecd3d",
"account_type": "admin"
}
{
"token": "93144b288eb1fdccbe46d6fc0f241a51766ecd3d",
"account_type": "admin"
}
Auth error
- application/json
- Schema
- Example (from schema)
- Example
Schema
error object
Describes the base error user might get
code stringPossible values: [
invalid_authentication
,permission_denied
,not_valid
,system_error
]Error code
message stringError message
data object
Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc.
param stringDescribes the parameter that did not pass a validation
{
"error": {
"code": "not_valid",
"message": "Data validation error",
"data": {
"param": "must be a string"
}
}
}
{
"error": {
"code": "invalid_authentication",
"message": "Invalid credentials"
}
}
Loading...