[V3] Virtual Calendar Usage with Scheduling Configuration

I’m trying to create a scheduling configuration object (Nylas v3 Scheduler API docs | Nylas Docs) for a virtual calendar that I’ve created for my user. I’m using the Python SDK for all of my Nylas operations (e.g., checking grant validity, get calendar, get email address for primary calendar).

My steps so far (at a high-level) are:

  1. Generate a uuid string to be used for the email parameter of the grant creation function.
  2. Create a grant for the provider “virtual-calendar”. I’m also adding a scope parameter to the request body with the value [‘calendar’].
  3. Storing the grant id to be used for future reference when creating events against the virtual calendar.
  4. Creating a virtual calendar (nylas_client.calendars.create()) with the previous grant.
  5. I then create a scheduling configuration with the previously created grant and virtual calendar.

When executing step 5, I see an error stating “No valid grant found for <email_uuid>”. I’m confused because the grant I’ve created is valid (i.e., I can query for calendars and I can create events). Given my grant is valid, I don’t understand why I’m unable to create the scheduling configuration and why specifically the API is complaining about an invalid grant.

I’m also experiencing a separate issue where I’m able to create an event against the virtual calendar but then when I query for events of that virtual calendar I’m returned an empty list.

Any help would be greatly appreciated!

Hello @sidappinkflow I will ask @antoine to jump in and help you out :slight_smile:

Hello @sidappinkflow upon further reading your post, we have found that your problem is not with the Scheduler, but with the Virtual Calendar :thinking:

I have create a Virtual Calendar, create and event and fetch it without any issues…

Keep in mind that you don’t use the email as a grant for a Virtual Calendar, as it should be something like this

4d3f1ce8-0b36-1732-9fcc-c8d1289d3ff7

Here are the docs Using virtual calendars | Nylas Docs I follow them and was able to get thigs working…