Webhooks
On this page
You can receive a webhook trigger in SAMMI by following these steps:
- Create a new button and add a Webhook Trigger
- the
Message
field must match thetrigger
key supplied in the HTTP Request -
If you leave
*
in theMessage
field it will accept any webhook triggers
- the
- Add
Trigger Pull Data
command inside the button that will pull any data supplied in the webhook request body when SAMMI receives the trigger.
The default URI is localhost:9450/webhook
for all POST
webhook requests.
You must pass an Authorization
header supplying the password if it’s enabled in the SAMMI Settings.
Using C#?
System.Net.ServicePointManager.Expect100Continue
must be set to false
to stop the header “Expect: 100-Continue” from being sent with the request as SAMMI will not handle it properly.
Parameter | Required | Type | Description |
---|---|---|---|
trigger | yes | string | trigger name matching the webhook trigger message field attached to a button |
any | no | any | Any custom data you wish to pass to SAMMI |
Example Request
{
"trigger": "myWebhookTrigger",
"customData": "Some cool data",
"customObjectData": {
"key": "Hello World",
"anotherKey": "Bye"
},
"customArrayData": ["Silver", "Sugar"]
}