POST /api/Auth/login

Realize a autenticação para obter um token de acesso válido. Esse token deve ser incluído no cabeçalho Authorization de todas as requisições subsequentes aos demais endpoints.

Headers

  • Content-Type string

Body

object object

Responses

  • 200

    OK

  • 401

    Unauthorized

POST /api/Auth/login
curl \
 -X POST https://api.e-bees.com.br/api/Auth/login \
 -H "Content-Type: application/json" \
 -d '{"email":"\u003cstring\u003e","password":"\u003cstring\u003e","env":"\u003cstring\u003e"}'
Request example
# Headers
Content-Type: application/json

# Payload
{
  "email": "<string>",
  "password": "<string>",
  "env": "<string>"
}
Request examples
# Headers
Content-Type: application/json

# Payload
{
  "env": "<string>",
  "email": "<string>",
  "password": "<string>"
}
Response examples (200)
{
  "tokenString": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3ZWJzaXRlIjoiaHR0cHM6Ly9zYW5kYm94LmUtYmVlcy5jb20uYnIiLCJzdWIiOiJmNmVkNDE2Ni0wYThmLTRiMzItODIwOC1lNDg3MDVmYzUxOWEiLCJlbWFpbCI6InZpdG9yQGUtYmVlcy5jb20uYnIiLCJqdGkiOiI0YWQ1ZjQyZS1hOWMyLTRkY2EtYTlmZi02MzdlNTBlYWE0ZGYiLCJpYXQiOjE2OTIwNTkwNzIsImlzQWRtaW4iOlsidHJ1ZSIsInRydWUiXSwiaXNDbGllbnRlIjoidHJ1ZSIsImNsaWVudElkIjoiZjZlZDQxNjYtMGE4Zi00YjMyLTgyMDgtZTQ4NzB1ZmM1MTlhIiwibmJmIjoxNjkyMDU5MDcyLCJleHAiOjE2OTIwNjYyNzIsImlzcyI6Imt1cmkiLCJhdWQiOiIqIn0.G4I_jBBPHkoBL1VyBbQLMmAhFxLr7x7LADJU7vX6ffx",
  "_links": {
    "self": {
      "rel": "Auth/Login",
      "href": "http://api.e-bees.com.br/api/Auth/login",
      "method": "POST"
    }
  }
}
Response examples (401)
{
  "date": "2023-08-14T22:00:03.1104217",
  "messages": [
    "Usuário ou senha inválidos!"
  ]
}