Processo de autenticação na plataforma.
Method | URI | Headers | Authorization |
---|---|---|---|
POST | /api/v3/auth/login | Content-Type:application/json | Authorization: Bearer {token} |
{
"email": "teste@doc88.com.br",
"password": "12345678"
}
{success} Response 200 (application/json)
{
"token": "eyJ0eXAiOiJKV1QiLCJ...."
}
{warning} Response 401 (application/json)
{
"error": "Unauthorized"
}
Method | URI | Headers | Authorization |
---|---|---|---|
POST | /api/v3/auth/logout | Content-Type:application/json | Authorization: Bearer {token} |
{success} Response 200 (application/json)
{
"message": "Logout successfully"
}
Method | URI | Headers | Authorization |
---|---|---|---|
GET | /api/v3/auth/me | Content-Type:application/json | Authorization: Bearer {token} |
{success} Response 200 (application/json)
{
"user": {
"id": 3,
"name": "teste",
"avatar": "/avatar/avatar-3.jpg",
"cellphone": null,
"email": "teste@doc88.com.br",
"active": true,
"admin": false,
"receive_alert_emails": 0
},
"account": {
"id": 1,
"name": "Conta Zordon"
},
"account_user": {
"id": 1,
"admin": true
},
"notification": false
}
Method | URI | Headers | Authorization |
---|---|---|---|
POST | /api/v3/auth/profile | Content-Type:application/json | Authorization: Bearer {token} |
{
"name": "Name of teste Updated",
"cellphone": "1112345678"
}
{success} Response 200 (application/json)
{warning} Response 401 (application/json)
{
"error": "Unauthorized"
}