Getting Data In

HTTP collector , pass the auth token within the URL

rsokolova
Path Finder

Thanks in advance.

The idea is to receive JSON message from Twilio with the SMS response. But in the Twilio's settings I cannot pass a header value for the AUTH token, which is making the communication to fail. Is there any other way I can achieve this ?

Using curl I can post a message successfully to the HEC (HTTP collector).
curl -k https://hec.example.com:8088/services/collector/event -H "Authorization: Splunk B5A79AAD-D822-46CC-80D1-819F80D7BFB0" -d '{"event": "hello world"}'
{"text": "Success", "code": 0}

Expecting to have something like if it even exists.
https://hec.example.com:8088/services/collector/event?AUTH=B5A79AAD-D822-46CC-80D1-819F80D7BFB0

Thanks again.

0 Karma
1 Solution

rsokolova
Path Finder

The answer for this was easier than I though. You can send a post message with basic auth, see below.

https://splunk:@hec.example.com:8088/services/collector/event

View solution in original post

0 Karma

rsokolova
Path Finder

The answer for this was easier than I though. You can send a post message with basic auth, see below.

https://splunk:@hec.example.com:8088/services/collector/event

0 Karma

proylea
Contributor

Hi
I'm wondering if you can post a little more detail about this, I am needing to send a json payload to Splunk from a mobile app, and the devs want a 1 line API/URL with authentication to send the event, did you get this sort of thing working.
I see from your original question that you were sending a test event with basic auth, I need to do this with a Splunk HEC token and can't seem to get the syntax right, are you able to help with what the syntax might look like?

Kind Regards
Peter

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 ...