Re-run verification
client.Webhooks.Verify(ctx, webhookID, body) (*WebhookVerifyResponse, error)
POST/v2/webhooks/{teamId}/{webhookId}/verify
Re-runs the GET challenge/echo handshake against the webhook’s url and updates its verified state.
Re-run verification
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.Verify(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
micro.WebhookVerifyParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
}
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"name": "name",
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"url": "https://example.com",
"verified": true,
"description": "description",
"updated_at": "2019-12-27T18:11:19.117Z",
"verification_token": "verification_token",
"verified_at": "2019-12-27T18:11:19.117Z",
"verification": {
"status": "pending"
}
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"enabled": true,
"name": "name",
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"url": "https://example.com",
"verified": true,
"description": "description",
"updated_at": "2019-12-27T18:11:19.117Z",
"verification_token": "verification_token",
"verified_at": "2019-12-27T18:11:19.117Z",
"verification": {
"status": "pending"
}
}