Using NIFI OAuth2 access Token provider
Dear all,
My NIFI version is 1.16.3.
I am trying to fetch the status of some processors (NIFI-API) within NIFI it self using InvokeHTTP processor.
My NIFI-API is protected and need authentication to be used. I have a technical user with username and password that could get a token from the token API endpoint:
https://nifi.company.com/nifi-api/access/token.
So I defined a controller service OAuth2AccessTokenProvider to generate access tokens.

From next defined API endpoint, I want to get the proprieties of a NIFI processor by its ID
https://nifi.company.com/nifi-api/processors/ae91429e-es3a-1eq9-fe53-b13680cff1e5
I used for that the InvokeHTTP processor with a GET HTTP method and by linking the OAuth2 Access Token provider field to the previously defined OAuth2AccessTokenProvider controller service.
But I am getting such error
InvokeHTTP Failed to properly initialize Processor. If still scheduled to run, NiFi will attempt to initialize and run the Processor again after the 'Administrative Yield Duration' has elapsed. Failure is due to java.io.UncheckedIOException: OAuth2 access token request failed: java.io.UncheckedIOException: OAuth2 access token request failed
- Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'utzcnd154ffd54gedg6g5fd6gdfg656556gdg5gdgt54894455444454fsdf45fd': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (String)"utzcnd154ffd54gedg6g5fd6gdfg656556gdg5gdgt54894455444454fsdf45fd"[truncated 548 chars]; line: 1, column: 81]
I changed the real Token value with a random series of characters.

