soapbox / webhooks
Handle webhook requests from the API
Installs: 4 206
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 12
Forks: 0
Open Issues: 4
Requires
- php: >=7.2
- illuminate/http: ^8.0
- illuminate/validation: ^8.0
- nesbot/carbon: ^1.22 || ^2.0
- soapbox/signed-requests: ^5.1
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-11-30 01:48:26 UTC
README
Set up
- Install the library
- Set up your
.env
WEBHOOKS_HANDLER_NAMESPACE=
- Set this to the namespace of where classes for your handlers will be
WEBHOOKS_SIGNED_REQUEST_ALGORITHM=sha256
WEBHOOKS_SIGNED_REQUEST_CACHE_PREFIX=signed-requests
WEBHOOKS_SIGNED_REQUEST_SIGNATURE_HEADER=GoodTalk-Signature
WEBHOOKS_SIGNED_REQUEST_ALGORITHM_HEADER=GoodTalk-Signature-Algorithm
WEBHOOKS_SIGNED_REQUEST_KEY=testing
WEBHOOKS_SIGNED_REQUEST_ALLOW_REPLAYS=true
WEBHOOKS_SIGNED_REQUEST_TOLERANCE_SECONDS=600
-
Set this to be able to receive webhooks requests from the API
-
WEBHOOKS_SIGNED_REQUEST_KEY
is generated from the artisan command on the API:webhook:create
-
The handler class name should be the camel case notation of the name of the event
- e.g. if the event type from the API is
user.updated
the class to hanle it should beUserUpdated
- e.g. if the event type from the API is