Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

85
Views
Google Calendar API doesn't return all events

I integrated the google API in my react project. I have about 300 Entries in my calendar but I only receive about 180 entries.

What is my Mistake?

Tank you!

const getEvents = async () => {
    function start() {
        gapi.client
            .init({
                apiKey: "MyKey",
            })
            .then(function () {
                return gapi.client.request({
                    path: `https://www.googleapis.com/calendar/v3/calendars/"myMail"/events`,
                });
            })
            .then((response) => {
                let events = response.result.items;
                console.log(events);
                setEventObject(events);
            });
    }
    gapi.load("client", start);
};

UPDATE This doesn't work. It seems like the additional parameters has no impact of the request...

const getEvents = () => {
    function start() {
        gapi.client
            .init({
                apiKey: "myKey",
            })
            .then(function () {
                return gapi.client.request({
                    path: `https://www.googleapis.com/calendar/v3/calendars/"myMail"/events`,
                    maxResults: 2500,
                    showDeleted: true,
                });
            })
            .then((response) => {
                let events = response.result.items;
                console.log(events);
                setEventObject(events);
            });
    }
    gapi.load("client", start);
};
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your passing your parameters the wrong way through the request. Checkout the google github

You need to pass the params URL params in key-value pair form.

return gapi.client.request({
    path: `https://www.googleapis.com/calendar/v3/calendars/"myMail"/events`,
    params: { maxResults: 2500, showDeleted: true }
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!