Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

92
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda