https://cal.com logo
#api
Title
# api
t

Tejas Badadare

04/21/2022, 10:44 PM
Hey folks, i'm trying to use the API to read/modify resources on Cal such as bookings and availabilities. Based on the swagger docs at https://docs.cal.com/public-api looks like I can authenticate my requests to the API by providing an
apiKey=<key>
query param with my requests. However, when I do this using Postman (or the integrated swagger client on the website), I get a 401:
"error": "Your api key is not valid"
I've made sure the key is correct, and i've tried with a couple keys that i generated from the settings page. Am i calling the API wrong, or is there a different way to authenticate? TLDR: How do I authenticate with the public API using my API key?
Okay looks like the API server is having some issues. I got a 500 on one of my attempts at requesting
<https://api.cal.com/v1/users?apiKey=cal_31e***32e>
. I can provide the full api key if needed for debugging.
z

zomars

04/21/2022, 11:48 PM
We're looking into it and we may have an update ready for tomorrow. cc @Agusti
t

Tejas Badadare

04/21/2022, 11:49 PM
Great, thanks for the support
a

Agusti

04/22/2022, 7:23 PM
Hello Tejas, I think the problem is you’re calling with a production apiKey, we’re expecting to launch to production today or tomorrow, but for now both api.cal.dev and api.cal.com point both to staging database (until some reviews are addressed after initial internal testing, we didn’t want to expose production) I will get back at you once we’re on prod, but for now you can get around it by getting your api keys from app.cal.dev
t

Tejas Badadare

04/22/2022, 7:25 PM
Hey @Agusti thanks for the reply - yup i pieced that together from other conversations. I did have an issue with the staging API keys that I reported here, but there is a workaround. Might i add that yalls public API is far more fully featured than Calendly's so cheers to that 🙂
❤️ 1
a

Agusti

04/22/2022, 7:25 PM
Yes! 🙏 thanks for reporting that looking into fix it!
👍 1
I think it’s a bad validation on the form
3 Views