Project

hivehook

0.0
The project is in a healthy, maintained state
Ruby client for Hivehook, the self-hostable webhook gateway. Manage sources, destinations, subscriptions, applications, endpoints, and verify inbound webhook signatures.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 5.0
~> 13.0
 Project Readme

hivehook (Ruby)

Official Ruby client for Hivehook, webhook infrastructure for modern teams (inbound and outbound).

Latest release: 0.1.1 on RubyGems.

Install

gem install hivehook

Or in your Gemfile:

gem "hivehook"

Quick start

require "hivehook"

client = Hivehook::Client.new(
  base_url: "http://localhost:8080",
  api_key: ENV.fetch("HIVEHOOK_API_KEY"),
)

source = client.sources.create(
  "name" => "Stripe production",
  "slug" => "stripe-prod",
  "providerType" => "stripe",
  "verifyConfig" => { "secret" => "whsec_..." },
)

puts "created source #{source['id']}. POST webhooks to /ingest/#{source['slug']}"

Webhook signature verification

require "hivehook/webhook"

signature = request.headers["X-Hivehook-Signature"]
timestamp = request.headers["X-Hivehook-Timestamp"].to_i
ok = Hivehook::Webhook.verify(body, "your-signing-secret", signature, timestamp, 300)

Documentation

See the full reference at hivehook.com/docs.

License

MIT. See LICENSE.