Authenticates a user against the AgFlow API using an email address (or username) and password, returning a Bearer access token (JWT) that must be sent in the Authorization header of every subsequent API call.This endpoint runs on a different host than the other endpoints documented in this project. The full authentication URL is https://agflow.agrisk.app/api/login — do not use the base host configured for the other API routes for this call. When testing directly in this Apidog project, the path already uses the {{authBaseUrl}} environment variable, which automatically resolves to the correct host for the active environment (Development or Production).The request body must contain the fields credential and password. The credential field accepts either an email address or a username; there is no email field in this contract — sending one instead of credential results in a server error.The returned token has a short lifetime, on the order of minutes. We recommend re-authenticating periodically rather than assuming a long-lived token, and treating 401 responses on other calls as a signal to request a new token.
Requisição
Parâmetros Bodyapplication/jsonNecessário
Examples
Respostas
🟢200Authenticated successfully
application/json
Returns the access token to be used in the Authorization header of other API calls.