A web service that provides webhook testing capabilities and a web interface for monitoring webhook requests.
- Webhook Reception: Accepts HTTP requests at
/{token}
endpoints - Request Storage: Stores incoming webhook requests with full metadata
- Web Interface: User-friendly web UI for testing and monitoring
- Token Management: Generate, list, and delete webhook tokens
- Real-time Logs: View webhook request logs through the web interface
POST/GET/PUT/DELETE /{token}
- Webhook endpoint (accepts any HTTP method)GET /{token}/log/{count}
- Retrieve webhook logs (CLI compatible)
POST /api/tokens
- Generate new webhook tokenGET /api/tokens
- List all tokensDELETE /api/tokens/{token}
- Delete a token and its logs
GET /
- Web interface for testing and monitoring
-
Install Dependencies:
cd webhook-service cargo build --release
-
Run the Service:
cargo run
-
Access the Web Interface: Open http://localhost:3000 in your browser
-
Use with Webhook CLI:
# Update your CLI config to point to this service # In config.toml or config.local.toml: base_url = "http://localhost:3000" # Generate a token webhook generate # Monitor webhooks webhook monitor --token <your-token>
-
Update CLI Configuration: Edit
config.toml
orconfig.local.toml
in your CLI project:[webhook] base_url = "http://localhost:3000"
-
Generate a Token:
webhook generate
-
Monitor Webhooks:
webhook monitor --token <generated-token>
-
View Logs:
webhook logs --token <generated-token>
- Token Management: Create, view, and delete webhook tokens
- Webhook Testing: Send test webhook requests with custom headers and body
- Log Viewing: Browse webhook request logs with detailed information
- Real-time Updates: Refresh logs to see new incoming requests
The service uses SQLite for data storage. The database file (webhook_service.db
) is created automatically in the service directory.
The service runs on 0.0.0.0:3000
by default. To change the port or host, modify the main.rs
file:
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;
You can also set a public base URL (for generated webhook links) via:
bash +export BASE_URL="https://your.domain.example" +
cargo build --release
cargo run
MIT License.