【问题标题】:Is this Calendly.com URL Valid?这个 Calendly.com URL 有效吗?
【发布时间】:2017-02-02 15:01:54
【问题描述】:

我是第一次使用 calendly.com 的 webhook。我想按照here 的描述创建订阅。当我开始这样做时

curl --header "X-TOKEN: <your_token>" --data "url=https://blah.foo/bar&events[]=invitee.created" https://calendly.com/api/v1/hooks

我担心url 的格式无效。我尝试用? 替换&amp;,就像这里一样

curl --header "X-TOKEN: <your_token>" --data "url=https://blah.foo/bar?events[]=invitee.created" https://calendly.com/api/v1/hooks

但我收到此错误

{"events":{"events":["can't be blank]}}

同样,我尝试将&amp; 及其后面的所有内容留空,并给出与上述相同的错误。

但是使用带有 &amp; 的 url 以及其中的所有内容都会产生 404 not found 错误。一个 url 甚至可以有他们所说的格式吗?

【问题讨论】:

    标签: url curl webhooks calendly


    【解决方案1】:

    但是使用带有&amp; 的网址以及其中的所有内容都会出现 404 not found 错误。

    下面的 URL 部分只是 &amp; 字符之前的 https://blah.foo/bar 部分。

    curl --header "X-TOKEN: <your_token>" --data "url=https://blah.foo/bar&events[]=invitee.created" https://calendly.com/api/v1/hooks
    

    events[]=invitee.created 部分是单独的参数和值。它不是url 的一部分。

    查看日历文档中的Create A Webhook Subscription 页面:

    所以 URL 是运行你的 webhook 的站点;您不会将events 参数/值发送回该站点,而是将url 参数和events 参数发送到https://calendly.com/api/v1/hooks 的日历API 端点。然后,calendly 后端可能会调用https://mywebsite.com/webhooks/invitee_createdhttps://blah.foo/bar,无论您给它什么url,但没有events 参数,这是供calendly 内部使用的。

    【讨论】:

    • 谢谢。你是完全正确的。我在想这些事件是查询参数列表的一部分,但它是为 calendly 的人准备的,而不是我。感谢您的详细回答。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-09
    • 1970-01-01
    • 1970-01-01
    • 2011-02-04
    • 2011-09-03
    • 2011-10-16
    相关资源
    最近更新 更多