Webhook Forwarding

Forward webhooks from HookWatch to your local development server in real-time. The CLI connects via gRPC streaming to receive webhooks instantly as they arrive.

Basic Usage

Forward webhooks from an endpoint to your local server:

Terminal

By default, webhooks are forwarded to http://localhost:3000.

Authentication

If you haven't logged in, pass your API key:

Terminal

Get your API key from the API Keys page in your dashboard.

Options

FlagEnvironment VariableDefaultDescription
--api-keyHOOKWATCH_API_KEY-API key for authentication
--forwardFORWARD_URLhttp://localhost:3000URL to forward webhooks to
--serverHOOKWATCH_SERVERapi.hookwatch.dev:9090HookWatch gRPC server address
-v, --verbose-falseEnable verbose output
--no-color-falseDisable colored output
--json-falseOutput events as JSON (one per line)
--insecureGRPC_INSECUREfalseUse insecure connection (no TLS)

Examples

Forward multiple endpoints

Listen to multiple endpoints simultaneously:

Terminal

Forward to a different port

Send webhooks to a custom URL:

Terminal

JSON output for scripting

Pipe JSON output to other tools:

Terminal

Verbose output for debugging

See detailed connection and request information:

Terminal

How it works

  1. The CLI connects to HookWatch via gRPC streaming
  2. Subscribes to the specified endpoint slugs
  3. Receives webhooks in real-time as they arrive at HookWatch
  4. Forwards each webhook to your local server
  5. Reports delivery status back to HookWatch

Real-time streaming

Unlike polling-based solutions, the CLI uses gRPC bidirectional streaming for instant webhook delivery with minimal latency.

Troubleshooting

Connection refused

Make sure your local server is running and listening on the correct port.

Authentication failed

Verify your API key is correct. Run hookwatch login to re-authenticate.

No webhooks received

Ensure the endpoint slug is correct and the endpoint exists in your account.

Timeouts

Check your firewall settings. The CLI needs to connect to api.hookwatch.dev:9090.

Related