Log in user
Log in user
Logs a user into the Sinatra service.
Request endpoint: /{version}/login/
Request Method: POST
| Parameter | Where To Place | Data Type | Description |
|---|---|---|---|
| version | path | String required | The API version. Only version 1.0 is currently supported. Other version values are accepted but are treated as 1.0. Example:1.0 |
Request body:
| Parameter | Data type | Description |
|---|---|---|
| String required | Email address of user logging in. | |
| password | String required | Password of user logging in. |
Response Parameters:
| Parameter | Data type | Description |
|---|---|---|
| jwt-auth | String required | Unique session ID. This session ID is available for only 20 minutes. This header value must be used in subsequent requests, otherwise the request will not be authorized. |
Example Response:
{
"permissions": [
{
"id": 1,
"name": "View games catalog"
},
{
"id": 27,
"name": "View Game provider list"
}
],
"user": {
"id": 5,
"email": "tst@domain.com",
"type": "OPERATOR",
"password": "somehash",
"avatar": null,
"status": 1,
"entityIds": null,
"organization": {
"id": -1,
"name": "TST",
"status": 1,
"available_roles": null,
"available_vendors": null,
"available_operators": null,
"type": "OPERATOR"
},
"organization_id": -1,
"role_id": 1,
"first_name": "Tst",
"last_name": "Test",
"last_login": 1603114441000
},
"available_operators": [
9999999
],
"available_vendors": [],
"login_as": false,
"original_email": "tst@domain.com"
}Error Response:
{
"errMsg": "Username or Password incorrect"
}Response codes:
| Code | Status | Message |
|---|---|---|
| 200 | success | Login user to site |
| 400 | Username or Password incorrect | Username or Password incorrect |
| 500 | internal server error | internal server error |