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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...