Connect Stripe or GitHub with one key
anyhook_connectWire a provider to AnyHook in one call: give a Stripe or GitHub key and AnyHook registers the app's inbound URL as a webhook at the provider, saves the signing secret it yields, and turns on signature verification at the edge. The provider is read from the key; the key is used once and not stored. Without appSlug a new app is created (and removed again if the provider refuses the key). Re-running replaces the registration instead of duplicating it. GitHub sends a signed ping immediately, so the first event appears within seconds. Add a destination afterwards (PATCH /api/v1/apps/{slug}) to forward events; until then they are received and logged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | GitHub only: "owner/repo", or an organization name for an org-wide hook. Optional when the token administers exactly one repository. | |
| api_key | No | API key (ahk_live_...) from anyhook_quickstart. Only needed over HTTP when no Authorization header is set; ignored over stdio. | |
| appSlug | No | Connect this existing app. Omit to create a new app for the provider. | |
| provider_key | Yes | A Stripe secret or restricted key (sk_… / rk_…) or a GitHub token (github_pat_… / ghp_…). The provider is read from the key. Used once to register the webhook at the provider; AnyHook does not store it. Least privilege: a Stripe restricted key with Webhook Endpoints = Write, or a fine-grained GitHub token with Webhooks = Read and write. |