After creating a virtual-calendar connector, creating a grant via the api, and creating a calendar. Call the free/busy api results in the following error.
const res = await nylas.calendars.getFreeBusy({
identifier: import.meta.env.NYLAS_GRANT_ID,
requestBody: {
startTime: start,
endTime: end,
emails: ["catering-for-pickup"]
}
});
NylasApiError: Invalid value in 'emails' parameter: catering-for-pickup
While I’m not sure why it says there is no primary calendar, it seems the waters are getting muddied by having non emails in the emails field for connections. You may be trying to do too much by having an OAuth system also trying to handle non OAuth related requests. May be better to just have dedicated fields for virtual calendars?
@vacarsu - I’m taking a look into this, so I can reproduce your similar issue, let me investigate this further against the docs and implementation to clarify.