Getting Data In

How to I find my ACCESS_TOKEN for the REST API?

tashburn
New Member

How to I find my ACCESS_TOKEN to use the REST API?

Tags (2)
0 Karma

bmacias84
Champion

@tashburn, I guessing your tying to use the HTTP Header method of authenticating with Splunkd. Your access-token is your session key which can be used against the API, which can be retieved from the /services/auth/login and will be a long string of hexadecimal chars.


curl -k -u <user>:<passw> https://<splunkd>:8089/services/auth/login \ -d username=<user> -d password=<passw>


<response>
<sessionKey>##someHexdecimalNumber##</sessionKey>
</response>

Additional info:

auth/login

REST API Overview - Auth Methods

Authentication

Hope this helps.

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...