Documentation Menu

Forward webhooks to localhost

The Hookmetry CLI connects to an endpoint and forwards received requests to a local HTTP server. Use it while developing a handler that a provider cannot reach directly.

Before you begin

  • Node.js and npm.
  • A Hookmetry account and CLI token.
  • A local HTTP server.

Install and authenticate

bash
npm install --global @hookmetry/cli
hookmetry login

Start forwarding

If you omit --endpoint, the CLI prompts for one of your active endpoints. The local target is http://localhost:<port>. Incoming captures are broadcast to the tunnel after Hookmetry processing; a local forwarding failure does not remove the stored webhook log.

bash
hookmetry listen --endpoint <endpointId> --port 3000

Troubleshooting

  • Run hookmetry status to check the saved token and API connection.
  • Run hookmetry endpoints to confirm the endpoint ID.
  • Start the local HTTP server before sending a request.
  • A capture can succeed even when forwarding to the local target fails.

Was this page helpful?

Your feedback helps us improve the docs.