General Question about Webhooks

New Contributor III

Can someone tell me what I'm doing wrong here:


MESSAGE="Hello World"
curl -H "Content-Type: application/json" 
     -X POST 
     -d "{"color": "purple", "message_format": "text", "message": "$MESSAGE" }"$ROOM_ID/notification?auth_token=$AUTH_TOKEN

That script works to update my HipChat room when executed. However, if I place the URL in Webhooks section of the JSS (see photo) nothing gets sent to the room. I'm wondering if anyone can tell me what I'm doing wrong, or what step I'm missing?ebffc5e54e754c5fb39cf1cca5936f0f


Contributor II

Hey there Brett,

You won't be able to POST a Jamf webhook directly to a chat service like HipChat. HipChat is expecting a specific JSON format for data send to inbound webhooks, and you need to authenticate by passing your token as you have in your sample script.

There needs to be a "relay" service that sits between Jamf Pro and HipChat. Here's an example of what that all looks like:
Jamf Pro Integration Diagram

Your relay/integration needs to accept the webook POST from Jamf Pro, extract the details you want from the webhook data, format that into JSON for a HipChat message and the POST that using your API token to HipChat.

I have two Python examples using Flask that I can point you to which send webhook events to HipChat as notifications:

Patch Notification Example

Casper-HC (Jamf Pro <-> HipChat Plugin)