Closed JaspervdK closed 6 years ago
Can you provide an example of the call you're make in JS. This wasn't an intended change and so we'll convert your example to a spec and fix it.
Example request:
const cronofyOptions = {
last_modified: new Date(request.payload.notification.changes_since).toISOString(),
calendar_ids: ['acc_567236000909002'],
include_deleted: 'true',
tzid: 'Etc/UTC,
access_token: -redacted-
};
return cronofyClient.readEvents(cronofyOptions, (err, response) => {
// Here we get the following error back
// Error: {"errors":{"calendar_ids":[{"key":"errors.invalid_calendar_ids","description":"One or
// more of the calendar IDs provided was invalid"}]}}
})
Thanks for taking a look
This should be fixed in 3.0.2 thanks for the detailed report
Hi, Recently we tried upgrading the cronofy package we use in our application to version 3.0.1, but this resulted in almost all google calender id's to be encoded incorrectly in the cronofy API requests. We reverted to version 2.5.1 to quickly fix this.
We tried debugging and it seemed that the query string transformation (here: https://github.com/cronofy/cronofy-node/blob/master/src/index.js#L39-L43) has some trouble, when a request is made with an array of id's.
A request like:
GET /v1/events?calendar_ids[0]=cal_WadMsTnUCBCpAAEQ_pRJpqAObLfeK0n@ZueaiwQ&tzid=Etc/UTC
would get transformed to:GET /v1/events?calendar_ids%5B0%5D=cal_WddMsTnUCBCPAAed_pRJpqAObLfeK0n%40ZueaiwQ&tzid=Etc%2FUTC
Is this a known issue?