cal.com
cal.com copied to clipboard
[CAL-2508] Team event link -> adding webhook via api doesn't work
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
- 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
I get this response:
- Sending the same payload via api - i get this response 'No EventType found'
This is the json payload via api:
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.
@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 We are going to implement this for 3.9. Should see it released soon.
@keithwillcode Thank you, for the update
@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
Hi, @asadath1395, i will check it again. Thank you.
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:
-
"Unrecognized key(s) in object: 'secret'"
-
"No EventType found" /while the eventType with this Id exists in DB
.
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.