Skip to main content

Token Generation

To consume the REST service, it is necessary to generate an authentication token. To do so, a GET request must be made, using basic authentication (Authorization: Basic) in the headers, with the user and password created previously.

🔗 Endpoint

GEThttp://localhost:8080/ValidadorDatainnova/apiPublica/TokenService/token

🧾 Possible Responses

  • 200 OK: The token is successfully generated.
  • 401 Unauthorized: Incorrect or missing username and password.

✅ Example of Response (200 OK)

{
"token": "eyB03dsfddfmsz3433SM3sdf20093SDdmmsns2sd1022"
}

❌ Example of Response (401 Unauthorized):

{
"error": "error de autenticación. Debe enviar un usuario y clave válidos."
}

Tokens are valid for 1 hour (3600 seconds). Once expired, the endpoint must be called again to generate a new one.