Appearance
@ahpd/webhook
Webhooks for the @ahpd/server daemon. A program outside the host calls a URL, and the call talks to a bot or fires an automation.
Each endpoint is a record in the webhooks collection, and names its own vault secret. A call passes only with that secret as its bearer token.
Part of ahpd. The source is in packages/webhook.
Install
bash
ahpd plugin install @ahpd/webhook
ahpd restartUpdate, remove and one-run flags such as --plugin are in Plugins.
Options
In the configuration file, with every option set:
json
{ "plugins": [{ "name": "@ahpd/webhook", "options": { "syncTimeoutSeconds": 60 } }] }| Option | Default | What it does |
|---|---|---|
syncTimeoutSeconds | 60 | How long a sync call waits for its turn to end, in seconds |
An endpoint
md
---
id: ci
bot: bot://motion
secret: host:ci-hook
callbackPrefix: https://ci.example.com/hooks/
---Kept as <configDir>/webhooks/ci.md, this endpoint answers POST /plugins/webhook/ci with Authorization: Bearer <the value of host:ci-hook>.
WEBHOOKS.md describes the record, the call and the answers.
Documentation
| WEBHOOKS.md | The record, the call and the answers |
License
MIT.
What a webhook endpoint is and what it may reach are WEBHOOKS.md.