Skip to main content
Question

Invalid Argument for "event_type_available_times" endpoint

  • November 28, 2024
  • 2 replies
  • 199 views

curl --request GET \
--url 'https://api.calendly.com/event_type_available_times?event_type=https%3A%2F%2Fapi.calendly.com%2Fevent_types%2Fd9ceda1a-7a6e-4fa1-b0af-59c2df7c2387&start_time=2020-01-02T20%3A00%3A00.000000Z&end_time=2020-01-07T24%3A00%3A00.000000Z' \
--header "Authorization: Bearer $BEARER_TOKEN" \
--header 'Content-Type: application/json'

What’s wrong with my request? I tried using the request-creator tool in the docs: https://developer.calendly.com/api-docs/6a1be82aef359-list-event-type-available-times, but in that UI or in curl, i get the same error: {"title":"Invalid Argument","message":"The supplied parameters are invalid."}

For reference, I got this event_type uuid from a successful call to the  https://api.calendly.com/event_types endpoint.

2 replies

  • Author
  • Community Member
  • 2 replies
  • December 2, 2024

I discovered the reason my call was failing:

  1. My date range was > 7 days
  2. I was using `now()` for the start_time. By the time the request got to calendly’s server (some amount of MS), it was in the past, and it seems that Calendly doesn’t support looking backwards. Personally, I think this is silly to not support at least the last 24 hours, but so be it. I am now doing `now() + 10 seconds` for my start_time.

  • Employee
  • 9 replies
  • February 22, 2025

Thanks for sharing your workaround. 

The 7-day requirement is documented on https://developer.calendly.com/api-docs/6a1be82aef359-list-event-type-available-times but we’ll update the API to provide more descriptive error messages in cases like this.