Skip to content

Obține token bearer

Obține tokenul bearer necesar pentru autentificare în aplicatie.

Endpoint

http
POST /api/v1/login

Parametri

Parametri body

ParametruTipObligatoriuDescriere
emailstringyesEmailul înregistrat al utilizatorului.
passwordstringyesParola utilizatorului.

Exemplu de cerere

sh
curl --location --request POST 'https://files.ro/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "john@doe.com",
  "password": "filesro"
}'

Răspuns

json
{
  "type": "success",
  "message": "You were successfully authenticated",
  "data": {
    "token": "1|token"
  }
}
json
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is required."
    ]
  }
}
json
{
  "type": "error",
  "message": "Email address is not verified."
}