You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Node.js中Calendly Webhooks搭配ngrok无法工作的问题

Calendly Webhooks 无法触发Node.js端点(此前正常工作,RequestBin可正常接收)

首次在Stack Overflow发帖,若问题有疏漏请见谅。

我正在试用Calendly Teams版本,在Node.js Web应用中使用其Webhooks功能,相关代码如下:

user.js

app.post('/calendly-webhook', (req, res) => UserController.registerCalendlyWebhook(req, res))

app.post('/calendly', (req, res) => UserController.rescheduleCalendlyTest(req, res))

我暴露了两个端点:/calendly-webhook用于注册Webhook,/calendly用于接收Calendly推送的数据。

controller.js

async registerCalendlyWebhook(req, res) {
        try {
            console.log('test')
            const calendly = new CalendlyService();
            const currentCalendly = await calendly.getCurrent()
            const webhookParams = {
                url: "https://de46-2001-4455-6c9-2800-850c-710e-73a-e978.ap.ngrok.io/calendly",
                events: [
                    "invitee.created",
                    "invitee.canceled"
                ],
                organization: currentCalendly.resource.current_organization,
                user: currentCalendly.resource.uri,
                scope: "user",
                signing_key: "FoNCQVQESdyQX_g8QZN0ZTSDb_FCEPAU-fJMc86mgBw"
            }
            console.log('CURRENT: ', currentCalendly.resource)
            const webhook = await calendly.createWebhookSubscription(webhookParams)
            console.log('WEBHOOK: ', webhook)
            return res.status(httpStatus.OK).send({ message: 'Webhooks accepted successfully' })
        } catch (error) {
            console.log(error)
        }
    }

    /**
   * Calendly test
   * @param {*} req 
   * @param {*} res 
   */
    async rescheduleCalendlyTest(req, res) {
        console.log('****************************************************************')
        console.log('It Works!!!!')
        console.log('****************************************************************')
        
    }

我已成功创建Webhook订阅,但核心问题是:创建或重新安排活动时,无法收到Calendly的推送请求。值得注意的是,几周前该功能还能正常工作,且用RequestBin替代ngrok作为接收地址时,Calendly的推送能正常到达。

已尝试的操作

  • 多次重置ngrok地址
  • 关闭Windows防火墙和杀毒软件
  • 在Calendly开发者平台创建新应用
  • 重新生成令牌并严格遵循官方文档操作

预期结果

成功创建Webhook订阅后,当安排新活动或重新安排现有活动时,/calendly端点应能收到Calendly的Webhook请求,至少能触发该方法内的console.log()语句。

实际情况

console.log()语句未触发,通过ngrok的请求日志也未看到来自Calendly的请求。

内容的提问来源于stack exchange,提问作者Roswaldo Flores

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.17 13:52:44