Webhook
重新生成 Webhook 签名密钥
通过 OMA API 重新生成 Webhook 签名密钥。
POST
/
v1
/
webhooks
/
{webhook_id}
/
regenerate_signing_secret
重新生成 Webhook 签名密钥
curl --request POST \
--url http://localhost:38080/v1/webhooks/{webhook_id}/regenerate_signing_secret \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'anthropic-beta: <anthropic-beta>' \
--data '{}'import requests
url = "http://localhost:38080/v1/webhooks/{webhook_id}/regenerate_signing_secret"
payload = {}
headers = {
"anthropic-beta": "<anthropic-beta>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'anthropic-beta': '<anthropic-beta>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('http://localhost:38080/v1/webhooks/{webhook_id}/regenerate_signing_secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/webhooks/{webhook_id}/regenerate_signing_secret"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("anthropic-beta", "<anthropic-beta>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"signing_secret": "<string>"
}每个请求都必须发送
anthropic-beta: webhooks-2026-03-01。创建接口只返回一次签名密钥。此页面对您有帮助吗?
⌘I
重新生成 Webhook 签名密钥
curl --request POST \
--url http://localhost:38080/v1/webhooks/{webhook_id}/regenerate_signing_secret \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'anthropic-beta: <anthropic-beta>' \
--data '{}'import requests
url = "http://localhost:38080/v1/webhooks/{webhook_id}/regenerate_signing_secret"
payload = {}
headers = {
"anthropic-beta": "<anthropic-beta>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'anthropic-beta': '<anthropic-beta>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('http://localhost:38080/v1/webhooks/{webhook_id}/regenerate_signing_secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/webhooks/{webhook_id}/regenerate_signing_secret"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("anthropic-beta", "<anthropic-beta>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"signing_secret": "<string>"
}