Send a test event
client.Webhooks.Ping(ctx, webhookID, params) (*WebhookPingResponse, error)
POST/v2/webhooks/{teamId}/{webhookId}/ping
Fire-and-forget test delivery through the async dispatcher. The webhook must be enabled and verified.
Send a test event
package main
import (
"context"
"fmt"
"github.com/micro-so/micro-sdk-go"
"github.com/micro-so/micro-sdk-go/option"
)
func main() {
client := micro.NewClient(
option.WithAPIKey("My API Key"),
option.WithTeamID("My Team ID"),
)
response, err := client.Webhooks.Ping(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
micro.WebhookPingParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.WebhookID)
}
{
"dispatched": true,
"event": "event",
"webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}Returns Examples
{
"dispatched": true,
"event": "event",
"webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}