<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How can I get the token to use the REST API in a user and password protected instance of NiFi? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-get-the-token-to-use-the-REST-API-in-a-user-and/m-p/235856#M197669</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have a NiFi instance running on a Docker container and, and I'd like to get some information about it through its API. To do so, I have followed the steps indicated here: &lt;A rel="noopener noreferrer noopener noreferrer noopener noreferrer" href="https://community.hortonworks.com/questions/96383/how-to-get-the-access-token-by-invoking-nifi-rest.html," target="_blank"&gt;https://community.hortonworks.com/questions/96383/how-to-get-the-access-token-by-invoking-nifi-rest.html,&lt;/A&gt; using this command: &lt;/P&gt;&lt;PRE&gt;curl 'http://&amp;lt;my_nifi_ip&amp;gt;:&amp;lt;my_nifi_port&amp;gt;/nifi/nifi-api/access/token' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'username=&amp;lt;my_user&amp;gt;&amp;amp;password=&amp;lt;my_password&amp;gt;' --compressed&lt;/PRE&gt;&lt;P&gt;But, when launching this command, it redirects me to the login page of NiFi&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;title&amp;gt;302 Found&amp;lt;/title&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;h1&amp;gt;Found&amp;lt;/h1&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;p&amp;gt;The document has moved &amp;lt;a href="/login.html"&amp;gt;here&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How can I solve my problem to get the token?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help. Regards.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2019 03:28:04 GMT</pubDate>
    <dc:creator>chortels</dc:creator>
    <dc:date>2019-07-19T03:28:04Z</dc:date>
  </channel>
</rss>

