This page describes how to authenticate to the Integrator via API and obtain an access token. The token is then used to authorize subsequent API calls (for example, sending Outbound flow data for flows set as "Outbound").
POSTLogin
This method is used to authenticate a user by e‑mail address and password and to retrieve a short-lived access token.
curl--location'https://flow-dev.entegrator.akinon.net:3000/api/nifi/login'\--header'Content-Type: application/x-www-form-urlencoded'\--data-urlencode'username=<user mail address>'\--data-urlencode'password=<password>'
Example Response (200 OK)
The response body is plain text and contains only the access token string:
You must include this token in the Authorization header when calling other secured Integrator endpoints:
Example Python Code (Using requests)
The following example shows how to log in, retrieve the token, and prepare headers for subsequent API calls using the requests library:
Response Errors
Status Code 400: Returned when the supplied credentials are invalid. The response body is the plain text message: The supplied username and password are not valid.
Status Code 400: Returned when the username and/or password are missing. The response body is the plain text message: The username and password must be specified.