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!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...