Skip to content

hivehook/sdk-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hivehook (.NET)

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

Latest release: 0.1.1 on NuGet.

Install

dotnet add package Hivehook

Quick start

using Hivehook;

var client = new HivehookClient(
    baseUrl: "http://localhost:8080",
    apiKey: Environment.GetEnvironmentVariable("HIVEHOOK_API_KEY")
);

var source = await client.Sources.CreateAsync(new Dictionary<string, object?>
{
    ["name"] = "Stripe production",
    ["slug"] = "stripe-prod",
    ["providerType"] = "stripe",
    ["verifyConfig"] = new Dictionary<string, object?> { ["secret"] = "whsec_..." },
});

Console.WriteLine(
    $"created source {source.Id}. POST webhooks to /ingest/{source.Slug}"
);

Webhook signature verification

using Hivehook;

string signature = Request.Headers["X-Hivehook-Signature"];
long timestamp = long.Parse(Request.Headers["X-Hivehook-Timestamp"]);
bool ok = Webhook.Verify(body, "your-signing-secret", signature, timestamp, 300);

Requirements

  • .NET 8.0 and .NET Standard 2.0

Documentation

See the full reference at hivehook.com/docs.

License

MIT. See LICENSE.

About

Official .NET client for Hivehook, webhook infrastructure for modern teams.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages