Docs

API integration

Forward Chunkify webhooks locally. Receive Asset and Upload events on your development server for testing.

Receiving Webhooks Notifications Locally

Use chunkify listen to forward webhook notifications to your local server. For example, test how your application handles a video Asset becoming playable or finishing preparation.

First, you need to retrieve your webhook secret in your project settings page under the Webhooks section.

webhook secret

Start forwarding webhooks to your local server:

chunkify listen \
  --forward-to http://localhost:3000/webhooks/chunkify \
  --webhook-secret <secret-key> \
  --events asset.playback_ready,asset.ready,asset.failed

  ██   ▗▄▄▖▗▖ ▗▖▗▖ ▗▖▗▖  ▗▖▗▖ ▗▖▗▄▄▄▖▗▄▄▄▖▗▖  ▗▖
██    ▐▌   ▐▌▄▐▌▐▌ ▐▌▐▛▚▖▐▌▐▌▗▞▘  █  ▐▌▗▖  ▝▚▞▘
  ██  ▝▚▄▄▖▐▌ ▐▌▝▚▄▞▘▐▌  ▐▌▐▌ ▐▌▗▄█▄▖▐▌     ▐▌

Chunkify CLI version: dev
https://chunkify.dev

────────────────────────────────────────────────

[mac.home] Start forwarding to http://localhost:3000/webhooks/chunkify

Events:
- asset.playback_ready
- asset.ready
- asset.failed

────────────────────────────────────────────────

[200 OK] notf_33f3pVlO3782tPF9CkioGK1IKTu asset.playback_ready (ast_33f3ocg9Vg0o0gDgg5JpCCR3DzX)
[200 OK] notf_33f3tiGWDw78SLHefdswGaL7UpB asset.ready (ast_33f3ocg9Vg0o0gDgg5JpCCR3DzX)

Use --events to choose which notifications to forward. For example, listen only for an Asset becoming playable or failing:

chunkify listen \
  --forward-to http://localhost:3000/webhooks/chunkify \
  --webhook-secret <secret-key> \
  --events asset.playback_ready,asset.failed

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