I have an unbuntu server running apache with virtual directories. I’m getting the following error when I attempt to register a webhook: Failed to create subscription: WebHook responds with incorrect HTTP status. HTTP status is 404.
The code that is rendering this error is:
async function createSubscription() {
try {
let response = await platform.post('/restapi/v1.0/subscription', {
eventFilters: [
"/restapi/v1.0/account/~/extension/~/telephony/sessions"
],
deliveryMode: {
transportType: "WebHook",
address: process.env.WEBHOOK_URL
}
});
console.log("Subscription created:", response.data);
} catch (error) {
console.error("Failed to create subscription:", error.message);
}
}