Auth Session
Method: POST
/api/ps/auth
Headers
'Content-Type': 'application/json'
Parameters
deviceId
- Unique application key, requiredemail
- Unique login user, requiredpassword
- Secret key for authentication, required
Code samples
await fetch('/api/ps/auth', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
deviceId: 'Unique key',
email: 'guest@keygenqt.com',
password: '12345678'
})
}).then(async (response) => {
console.log(response)
})
HTTP response status codes
Status code | Description |
---|---|
200 | OK |
400 | Bad Request |
422 | Form validate |
500 | Internal Error |
Status: 200
{
"id": 1,
"email": "guest@keygenqt.com",
"role": "GUEST"
}
Status: 400
{
"code": 400,
"message": "Bad Request"
}
Status: 422
{
"code": 422,
"message": "Unprocessable Entity",
"validate": [
{
"filed": "password",
"errors": [
"Size must be between 8 and 12"
]
}
]
}
Status: 500
{
"code": 500,
"message": "Internal Error"
}