Skip to main content

Go SDK

Official SDK for Go 1.21+.

Installation

go get github.com/Midbound/cloud-sdk-go

Webhooks

Verify and parse webhook events with full type safety:
import (
    midboundcloud "github.com/Midbound/cloud-sdk-go"
    "github.com/Midbound/cloud-sdk-go/option"
)

client := midboundcloud.NewClient(
    option.WithWebhookSecret(os.Getenv("MIDBOUND_WEBHOOK_SECRET")),
)

// Verify signature and parse event
event, err := client.Webhooks.Unwrap(payload, r.Header)
if err != nil {
    // Invalid signature
}

// Handle typed events
switch v := event.AsAny().(type) {
case midboundcloud.IdentityEnrichedWebhookEvent:
    person := v.Data.Enrichment.Person
    fmt.Println(person.FullName, person.LinkedinURL)
}

Webhook Example

Full working example with net/http and Firestore

API Usage

See the API Reference for all available methods with auto-generated examples.

Source