Splunk Search

Using Java to make a REST API call to Splunk, why am I getting "HTTP 401 -- call not properly authenticated"?

chandulal
Engager

I am using Java to make REST API call to Splunk to make a blocking search. We had deployed the app two days ago and the Splunk search ran fine for two days. But now it started showing "HTTP 401 -- call not properly authenticated" error. The username and password didn't change. In fact, after I got this error, I used same code base and credentials (pointed to the same server) and tried to run a search deploying on another server and the Splunk call works fine. I have no control over the Splunk server or access to any of server logs. Please help me fix this.

DreadEclipse
Explorer

I was having the same trouble just two days ago. Have you checked with the people in charge of the server where you work? It might be that the Host name or else the Port have changed or else something has happened to your personal information in the last two days (well, since the 22nd of May).
Are you trying to access Splunk through a different source than you used before? When I switched from accessing purely by the internet to using Java, my system gave me the same error. It turns out, if your password has any control characters, you'll need to HTML hard code them into the String or else they might not work every time.
Hope this helps!

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...