cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

[CAL-2508] Team event link -> adding webhook via api doesn't work

Open OlekSt opened this issue 2 years ago • 3 comments

Found a bug? Please fill out the sections below. 👍

Issue Summary

Trying to add a webhook (same as the owner of a team event link) to a team event link via api. It doesn't add it, while if I add the same webhook manually on cal.com, it works ok.

Steps to Reproduce

  1. this is the payload sent if I add a webhook link manually to a team event via post to this link => https://cal-testing.datacruit.com/api/trpc/webhook/create?batch=1 team_links_03

I get this response: team_links_04

  1. Sending the same payload via api - i get this response 'No EventType found' team_links_01

This is the json payload via api: team_links_02

Actual Results

...

Expected Results

-...

Technical details

  • Browser version, screen recording, console logs, network requests: You can make a recording with Bird Eats Bug.
  • Node.js version
  • Anything else that you think could be an issue.

Evidence

  • How was this tested? This is quite mandatory in terms of bugs. Providing evidence of your testing with screenshots or/and videos is an amazing way to prove the bug and a troubleshooting chance to find the solution.

CAL-2508

OlekSt avatar Sep 19 '23 07:09 OlekSt

@keithwillcode Hi, Keith, why was this ticket removed from the milestone? It won't be implemented? We were expecting to have it in the new 3.5 release.

OlekSt avatar Nov 08 '23 11:11 OlekSt

@OlekSt We are going to implement this for 3.9. Should see it released soon.

keithwillcode avatar Feb 14 '24 15:02 keithwillcode

@keithwillcode Thank you, for the update

OlekSt avatar Feb 17 '24 09:02 OlekSt

@OlekSt Mind testing this again? I can see it working when using the same payload as from the UI. Make sure the body is just how the docs mentions https://cal.com/docs/enterprise-features/api/api-reference/webhooks#create-a-new-webhook

{
    "subscriberUrl": "https://webhook.site/e932bdda-bea3-4f86-8e94-407cfade8537",
    "eventTriggers": [
        "BOOKING_CANCELLED",
    ],
    "active": true,
    "payloadTemplate": null,
    "secret": "",
    "eventTypeId": 1130
}

cc @keithwillcode

asadath1395 avatar Mar 13 '24 07:03 asadath1395

Hi, @asadath1395, i will check it again. Thank you.

OlekSt avatar Mar 18 '24 08:03 OlekSt

Hi, @asadath1395, i have tried this again. and it doesn't work as previously.

I try to add a weboohook the in user's profile to a team event via UI, copy payload from Networks tab in Google Dev tools. It adds via UI, i can see it in DB. When i try to add via api in Postman using the same payload, i get 2 errors:

  1. "Unrecognized key(s) in object: 'secret'" image

  2. "No EventType found" /while the eventType with this Id exists in DB image.

We still are on version 2.9.8 on our server, and maybe upgrade to the latest will solve it, but we won't be doing it now.

Please let me know if I can try doing something differently to test this.

OlekSt avatar Mar 19 '24 12:03 OlekSt