JavaScript
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
const rotateWebhookSigningKeyResponse = await client.account.rotateWebhookSigningKey();
console.log(rotateWebhookSigningKeyResponse.webhookEventsHmacSecret);import os
from cadenya import Cadenya
client = Cadenya(
api_key=os.environ.get("CADENYA_API_KEY"), # This is the default and can be omitted
)
rotate_webhook_signing_key_response = client.account.rotate_webhook_signing_key()
print(rotate_webhook_signing_key_response.webhook_events_hmac_secret)package main
import (
"context"
"fmt"
"go.cadenya.com/cadenya-go"
"go.cadenya.com/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
rotateWebhookSigningKeyResponse, err := client.Account.RotateWebhookSigningKey(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", rotateWebhookSigningKeyResponse.WebhookEventsHMACSecret)
}
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
rotate_webhook_signing_key_response = cadenya.account.rotate_webhook_signing_key
puts(rotate_webhook_signing_key_response)cadenya account rotate-webhook-signing-key \
--api-key 'My API Key'curl --request POST \
--url https://api.cadenya.com/v1/account:rotateWebhookSigningKey \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cadenya.com/v1/account:rotateWebhookSigningKey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.cadenya.com/v1/account:rotateWebhookSigningKey")
.header("Authorization", "Bearer <token>")
.asString();{
"webhookEventsHmacSecret": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Accounts
Rotates the webhook signing key for the account
Rotates the webhook signing key for the account. Returns only the new key.
POST
/
v1
/
account:rotateWebhookSigningKey
JavaScript
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
const rotateWebhookSigningKeyResponse = await client.account.rotateWebhookSigningKey();
console.log(rotateWebhookSigningKeyResponse.webhookEventsHmacSecret);import os
from cadenya import Cadenya
client = Cadenya(
api_key=os.environ.get("CADENYA_API_KEY"), # This is the default and can be omitted
)
rotate_webhook_signing_key_response = client.account.rotate_webhook_signing_key()
print(rotate_webhook_signing_key_response.webhook_events_hmac_secret)package main
import (
"context"
"fmt"
"go.cadenya.com/cadenya-go"
"go.cadenya.com/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
rotateWebhookSigningKeyResponse, err := client.Account.RotateWebhookSigningKey(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", rotateWebhookSigningKeyResponse.WebhookEventsHMACSecret)
}
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
rotate_webhook_signing_key_response = cadenya.account.rotate_webhook_signing_key
puts(rotate_webhook_signing_key_response)cadenya account rotate-webhook-signing-key \
--api-key 'My API Key'curl --request POST \
--url https://api.cadenya.com/v1/account:rotateWebhookSigningKey \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cadenya.com/v1/account:rotateWebhookSigningKey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.cadenya.com/v1/account:rotateWebhookSigningKey")
.header("Authorization", "Bearer <token>")
.asString();{
"webhookEventsHmacSecret": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}⌘I