Support Questions
Find answers, ask questions, and share your expertise

Get NiFi authentication token in a secured instance



I'd like to obtain a token that allow me to perform certain read operations over a secured NiFi instance. To achieve so, I'm executing:

curl 'http://<ip_nifi>:<port_nifi>/nifi-api/access/token' -H 'Accept-Encoding: gzip, deflate,br' -H 'Content-Type:application/x-www-form-urlencoded;charset=UTF-8' -H 'Accept: */*' --data 'username=<my_username>&password=<my_password>' --compressed

But I'm having no success. In fact, when I execute this command, the message returned is:

<!DOCTYPE html>

<html lang="es" >

<meta charset="UTF-8">



<link rel="stylesheet" href="pcss/style.css">



<video autoplay muted loop id="video">

<source src="pvideo/background.webm" type="video/mp4">

Tu navegador no soporta video HTML5.


<div class="content">

<div class="login">

<div class="logo"></div>

<form method="post" action="/login">

<input type="text" placeholder="User" required="required" name="httpd_username" />

<input type="password" placeholder="Password" required="required" name="httpd_password" />

<input type="hidden" name="httpd_location" value="/nifi" />

<input class="submit" type="submit" class="btn btn-primary btn-block btn-large" value="Iniciar Sesión" />






Which is, in fact, the HTML code of the login screen. How could I obtain the token instead of this message?

Thanks for your help.



Here is a command I used to get a token:

curl 'https://nifi-hostname:nifi-port/nifi-api/access/token' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'username=username&password=password' --compressed --insecure

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.