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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...