Nylas SDK: Only Fetching 31 Google Calendar Events, No next_cursor

Hi everyone,

I’m using the Nylas SDK to fetch all events from my connected Google Calendar, but I’m only getting 31 events in the response. Additionally, the response does not include a next_cursor key, so I’m unable to paginate further.

Here’s how I’m making the request:

events = await nylas.events.list({
identifier: grantId,
queryParams: {
calendarId: cid,
limit: 200,
},
});

I expected to receive up to 200 events or at least a next_cursor for pagination, but that’s not happening. Has anyone encountered this issue before? Any suggestions on how to retrieve all events?

Thanks in advance!

Hi @kamal882 - thanks for reaching out.

Can you clarify the Nylas SDK version and language you are using, the next_cursor should be provided. Can you share more details, perhaps the the date range of events you are seeing?

Just checking the code sample. The max limit is 200, so you should see all events coming. I also see that you’re providing a calendar ID, so you will only retrieve all events for the single calendar.