CLI
API integration
Forward Chunkify webhooks locally. Receive job and upload events on your development server for testing.
Receiving Webhooks Notifications Locally
When integrating Chunkify into your app, you must rely on webhooks to receive events when a job is completed or when an upload is created. We have added the listen command to forward webhooks to your local server URL, which is normally not available publicly.
First, you need to retrieve your webhook secret in your project settings page under the Webhooks section.
Start forwarding webhooks to your local server:
chunkify listen \
--forward-to http://localhost:3000/webhooks/chunkify \
--webhook-secret <secret-key>
██ ▗▄▄▖▗▖ ▗▖▗▖ ▗▖▗▖ ▗▖▗▖ ▗▖▗▄▄▄▖▗▄▄▄▖▗▖ ▗▖
██ ▐▌ ▐▌▄▐▌▐▌ ▐▌▐▛▚▖▐▌▐▌▗▞▘ █ ▐▌▗▖ ▝▚▞▘
██ ▝▚▄▄▖▐▌ ▐▌▝▚▄▞▘▐▌ ▐▌▐▌ ▐▌▗▄█▄▖▐▌ ▐▌
Chunkify CLI version: dev
https://chunkify.dev
────────────────────────────────────────────────
[mac.home] Start forwarding to http://localhost:3000/webhooks/chunkify
Events:
- job.completed
- job.failed
- job.cancelled
- upload.completed
- upload.failed
- upload.expired
────────────────────────────────────────────────
[200 OK] notf_33f3pVlO3782tPF9CkioGK1IKTu job.completed (job_33f3ocg9Vg0o0gDgg5JpCCR3DzX)
[200 OK] notf_33f3tiGWDw78SLHefdswGaL7UpB job.completed (job_33f3siy9JhMrlsIY69q2gHqL3bh)
By default, it will forward all events, but you can specify the ones you are interested in:
chunkify listen \
--forward-to http://localhost:3000/webhooks/chunkify \
--webhook-secret <secret-key> \
--events job.completed,job.failed,job.cancelled
What chunkify listen does under the hood:
- Creates a temporary webhook in your project
- Forwards all notifications to your local server
- Signs requests with the webhook secret key
- Cleans up the webhook when you exit