<?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>topic Re: Why do I receive REST API &amp;quot;login failed&amp;quot; message? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280932#M53754</link>
    <description>&lt;P&gt;Hi nsshey,&lt;/P&gt;

&lt;P&gt;You should provide user login information with your &lt;CODE&gt;curl&lt;/CODE&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; curl -k -u admin:changeme &lt;A href="https://hosthere:8089/services/auth/login" target="test_blank"&gt;https://hosthere:8089/services/auth/login&lt;/A&gt; ....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See the docs for more details &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.0/RESTTUT/RESTbasicexamples"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.0/RESTTUT/RESTbasicexamples&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2016 23:00:02 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2016-10-25T23:00:02Z</dc:date>
    <item>
      <title>Why do I receive REST API "login failed" message?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280930#M53752</link>
      <description>&lt;P&gt;I ran the following command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k &lt;A href="https://hosthere:8089/services/auth/login" target="test_blank"&gt;https://hosthere:8089/services/auth/login&lt;/A&gt; -d username=admin -d password=password
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and got a weird error, so I tried it in my browser:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://hosthere:8089/services/auth/login" target="test_blank"&gt;https://hosthere:8089/services/auth/login&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and got this error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;response&amp;gt;
&amp;lt;messages&amp;gt;
&amp;lt;msg type="WARN"&amp;gt;Login failed&amp;lt;/msg&amp;gt;
&amp;lt;/messages&amp;gt;
&amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't understand why I am getting this if I didn't even see the pop-up that asks me for login information. Sometimes my browser allows me to enter my login info, and then API works, and sometimes it doesn't. I checked and my pop-ups are enabled for this site.&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 22:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280930#M53752</guid>
      <dc:creator>nsshey</dc:creator>
      <dc:date>2016-10-25T22:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I receive REST API "login failed" message?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280931#M53753</link>
      <description>&lt;P&gt;Go to the access controls menu as an Admin and make sure your role has the following capabilities.&lt;/P&gt;

&lt;P&gt;rest_apps_view&lt;BR /&gt;
rest_properties_get&lt;BR /&gt;
rest_properties_set&lt;BR /&gt;
rest_apps_management&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:33:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280931#M53753</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2020-09-29T11:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I receive REST API "login failed" message?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280932#M53754</link>
      <description>&lt;P&gt;Hi nsshey,&lt;/P&gt;

&lt;P&gt;You should provide user login information with your &lt;CODE&gt;curl&lt;/CODE&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; curl -k -u admin:changeme &lt;A href="https://hosthere:8089/services/auth/login" target="test_blank"&gt;https://hosthere:8089/services/auth/login&lt;/A&gt; ....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See the docs for more details &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.0/RESTTUT/RESTbasicexamples"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.0/RESTTUT/RESTbasicexamples&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2016 23:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280932#M53754</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-10-25T23:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I receive REST API "login failed" message?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280933#M53755</link>
      <description>&lt;P&gt;Reviewing the REST API Reference, it appears that the tutorial docs are incorrect. &lt;/P&gt;

&lt;P&gt;Per &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/RESTREF/RESTaccess#auth.2Flogin"&gt;auth/login&lt;/A&gt; REST API docs section, the correct command here is (yes, enter username/pass 2x):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme  &lt;A href="https://localhost:8089/services/auth/login" target="test_blank"&gt;https://localhost:8089/services/auth/login&lt;/A&gt; -d username=admin -d password=changeme
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which returns an XML &lt;CODE&gt;response&lt;/CODE&gt; with a session key:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;response&amp;gt;
    &amp;lt;sessionKey&amp;gt;192fd3e46a31246da7ea7f109e7f95fd&amp;lt;/sessionKey&amp;gt;
&amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Aug 2017 19:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-do-I-receive-REST-API-quot-login-failed-quot-message/m-p/280933#M53755</guid>
      <dc:creator>nnmiller</dc:creator>
      <dc:date>2017-08-22T19:43:06Z</dc:date>
    </item>
  </channel>
</rss>

