Cal.com > get slots call returns 400 when used with API key. But if passed as header parameter, it works. Any one knows why?

Hi,

I am trying to get all available slots from cal.com api.
I have added cal.com API key as credentials. (It is correct)
I’d like to make this API call in n8n.

Here’s my n8n call and it throws a 400 Error.

But if I do not use the Credential facility and instead just pass the API key as a header item, it works.

Does any one know why the cal.com Credential facility does not work. Or how to make it work if I am doing it wrong.

Thanks.

The first screenshot includes your plain text apiKey! Be careful and better change it.

The first screenshot passes the apiKey as GET parameter. You can see it in the section on the right in Full message.

The second screenshot passes the key as Authorization in header.

Seems like that the Cal Api from n8n implements version 1 of the api, but you are using the version 2 of it.

You can either pass the api key as you do in second screenshot (i recommend to put it in a Header Auth credential to reuse it and hide credentials).

Thanks @Franz , there is no API key in the screenshot, I have blacked it out.

Any idea, how to make cal.com default n8n instance to use the V2?

n8n must either add an option to use v2 of cal.com api or add a new credential type for cal.com api v2.

I meant this screenshot

1 Like

Ah saw that. I killed that API key, thanks for pointing out.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.