Security

Unable to get REST API Token

a212830
Champion

Hi,

I am trying to get an auth token for REST API login, and it keeps saying "login failed". However, if I go to the gui, I can login with those same credentials.

I am accessing https://<host:port>/servicesNS/admin/search/auth/login.

Am I missing something?

Tags (2)
0 Karma
1 Solution

Damien_Dallimor
Ultra Champion

Can you give a better example of how you are trying to authenticate ? A Curl command perhaps ?

FYI : this works :

curl -k https://localhost:8089/services/auth/login -d username=admin -d password=foobar

View solution in original post

Damien_Dallimor
Ultra Champion

Can you give a better example of how you are trying to authenticate ? A Curl command perhaps ?

FYI : this works :

curl -k https://localhost:8089/services/auth/login -d username=admin -d password=foobar

a212830
Champion
0 Karma

splunkears
Path Finder

Splunk documentation is not correct for version 6- REST API
REF-- wrong end point in the doc:
http://dev.splunk.com/view/SP-CAAADQT

--for end point --> /servicesNS/admin/search/auth/login does NOT work and results "Login Failed"
where as the end point below

/services/auth/login works.

0 Karma

Damien_Dallimor
Ultra Champion

So obviously that differs from the correct example I gave you. Can you confirm that my answer worked for you and if so accept the Answer ? Thanks.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...