Unable to retrieve timeZone for provided event-type
Opened this issue ยท 2 comments
Found a bug? Please fill out the sections below. ๐
Issue Summary
Unable to retrieve the timeZone using the https://api.cal.com/v1/event-types/{id}
API mentioned here. Also tried out using /v2/event-types/{eventTypeId}
: but getting 400
error in this case.
- using
https://api.cal.com/v1/event-types/{id}
: response containstimeZone: null
- using
/v2/event-types/{eventTypeId}
, I'm gettingHTTP 400
error
Steps to Reproduce
Request payload for https://api.cal.com/v1/event-types/{id}
(ref. https://cal.com/docs/enterprise-features/api/api-reference/v1/event-types#find-an-event-type):
curl --location 'https://api.cal.com/v1/event-types/968063?apiKey=<cal_live_xyz>'
Response:
{
"event_type": {
"id": 968063,
"title": "Bolna POC - Discussion",
"slug": "bolna-discussion",
"length": 30,
"hidden": false,
"position": 0,
"userId": 943013,
"teamId": null,
"scheduleId": 292490,
"eventName": null,
"timeZone": null,
"periodType": "UNLIMITED",
....
....
....
}
}
Request payload for /v2/event-types/{eventTypeId}
(ref. https://api.cal.com/v2/docs):
curl --location 'https://api.cal.com/v2/event-types/968063' \
--header 'accept: application/json' \
--header 'cal-api-version: 2024-06-14' \
--header 'Authorization: Bearer <cal_live_xyz>'
Response:
{
"status": "error",
"timestamp": "2024-09-28T07:01:21.184Z",
"path": "/v2/event-types/968063",
"error": {
"code": "BAD_REQUEST",
"message": "0 - Invalid input, "
}
}
Note: cal_live_xyz
: is only used for representation purpose here, actual request used a valid API key.
@prateeksachan According to the document, you see that the response example has a null timezone, so this is intentional. By the way, why do you want to retrieve the timezone?
@anikdhabal the event for which I'm fetching, has a valid timeZone. Is there any way or API to get the timezone for that event? Or is that intentional and currently there's no way to get the timezone via APIs?
I have a use-case where I want to show all events belonging to a user with the timezones.