Retrieve Webhook Endpoint
client.Webhooks.Get(ctx, webhookEndpointID) (*WebhookEndpoint, error)
GET/webhook_endpoints/{webhook_endpoint_id}
Retrieves a webhook endpoint for the authenticated project.
Retrieve Webhook Endpoint
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("My API Key"),
)
webhookEndpoint, err := client.Webhooks.Get(context.TODO(), "whe_123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", webhookEndpoint.ID)
}
{
"id": "id",
"created_at": 0,
"event_types": [
"string"
],
"name": "name",
"object": "webhook_endpoint",
"signing_secret_hint": "signing_secret_hint",
"url": "url",
"updated_at": 0
}Returns Examples
{
"id": "id",
"created_at": 0,
"event_types": [
"string"
],
"name": "name",
"object": "webhook_endpoint",
"signing_secret_hint": "signing_secret_hint",
"url": "url",
"updated_at": 0
}