Skip to main content
Question

Webhook response

  • July 31, 2025
  • 1 reply
  • 29 views

@PhongVu 

Can you please confirm i am responding correctly to incoming EX webhooks?

router.post('/ringEX', async (req, res) => {
    console.log('\nReceived ringEX webhook event');
    
    if (req.headers.hasOwnProperty("validation-token")) {
        res.setHeader('Content-type', 'application/json');
        res.setHeader('Validation-Token', req.headers['validation-token']);
    }
    res.status(200).end();
//… rest of code

our EX webhook is consistently going down, even though our CX webhook has never gone down (can’t be the server). 


The subscription status also shows ‘Active’ even though the webhook is not firing.
Deleting and recreating the web hook immediately fixes the issue.
 

async function subscribe_for_notification() {
  var bodyParams = {
    eventFilters: ['/restapi/v1.0/account/~/telephony/sessions'],
    deliveryMode: {
      transportType: "WebHook",
      address: DELIVERY_ADDRESS
    },
    expiresIn: 31536000 // 1 year
  }
  try {
    let endpoint = "/restapi/v1.0/subscription" // don't edit this line
    var resp = await platform.post(endpoint, bodyParams)
    var jsonObj = await resp.json()
    console.log (`Subscription Id: ${jsonObj.id}`)
    console.log("Ready to receive incoming calls via WebHook.")
  } catch (e) {
    console.log(e.message);
  }
}

1 reply

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2423 replies
  • August 1, 2025

I don’t see anything wrong with the code.

When that issue happens, can you post a message to that path?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings