Hey folks, i'm trying to use the API to read/modif...
# api
t
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
We're looking into it and we may have an update ready for tomorrow. cc @Agusti
t
Great, thanks for the support
a
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
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
Yes! 🙏 thanks for reporting that looking into fix it!
👍 1
I think it’s a bad validation on the form