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

87
Views
How to retrieve more than 1000 otherContacts from Google API with pageToken?

I have a react App which I will be using to bring in google other contacts and I see that theres a limit for 1000 contacts in each call to google People Api's.

const getGoogleContacts = async (token) => {
        if(!token) throw new Error('Google Auth Token Missing');
        let params = {"readMask" : "emailAddresses,names", "pageSize" : "1000"};
        let url = `https://people.googleapis.com/v1/otherContacts?${new URLSearchParams(params)}`;
       
        let headers = { Authorization: `Bearer ${token}`};
        let rawData = await fetch(url, { headers })
            .then(res => res.text());
        let parsedJson = JSON.parse(rawData);
        let nextPageCheck = checkForNextPageToken(parsedJson);
        if(nextPageCheck){
         //get the next page contacts. 
         }
        return handleRawContactData(parsedJson);
    }
const checkForNextPageToken = (response) => {
        if(response.hasOwnProperty('nextPageToken')){
            return true;
        }
        return false;
    }
about 4 years ago · Juan Pablo Isaza
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!