Hi everyone,
I’m working with the Fireblocks Sandbox environment, and trying to set up Webhook V2 using the TypeScript SDK. I’m logged in as a non-signing admin, and I can successfully use basic SDK operations like:
const vaults = await fireblocks.vaults.getPagedVaultAccounts({ limit: 10 });
This runs fine and returns expected results.
However, when I try to create a webhook using V2 like this:
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
// Set environment variables
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox;
process.env.FIREBLOCKS_API_KEY = "{REDACTED}";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./scripts/fireblock.pem", "utf8");
// Initialize Fireblocks SDK
const fireblocks = new Fireblocks();
// Define webhook request body
const body = {
createWebhookRequest: {
url: "https://c7e8497a54ac.ngrok-free.app/webhooks/fireblocksWebhook",
eventTypes: [
"vault_account.asset_added",
"vault_account.asset_updated"
],
secret: "your-webhook-secret",
},
};
// Create webhook
fireblocks.webhooksV2Beta.createWebhook(body)
.then((res) => {
console.log('Webhook created:', res);
})
.catch((error) => {
console.error('Error creating webhook:', error);
});
It throws a 403 Forbidden error.
Also, I don’t see any UI option for Webhook V2 in the Sandbox dashboard.
My Questions:
-
Does Webhook V2 require specific roles or permissions that non-signing admins don’t have?
-
Is Webhook V2 supported in the sandbox environment at all?
-
What conditions or roles are required to call
webhooksV2Beta.createWebhook()via the SDK?
Thanks in advance for any help or clarification!