Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

144
Visualizações
GMail API Failure but not even close to the daily limits

So I have written a Google App Script that will use the Admin SDK - Directory API to get a list of about 80 users. I then take each user and create a Email template with their directory data and then use the Gmail API to set their signature to a company default https://github.com/MrCaspan/GAS-Gmail-Signature-Templator if you care to look at the code. We run the script once an hour so that should be about 24 calls to the Directory API (No issues there) and about 1920 calls to the Gmail API in a 24 hour span (24 x 80 users) But I keep getting this error about 7PM every night and only for a few hours then it goes away

{
  "error": {
    "code": 429,
    "message": "User-rate limit exceeded.  Retry after 2021-10-21T23:45:03.158Z",
    "errors": [
      {
        "message": "User-rate limit exceeded.  Retry after 2021-10-21T23:45:03.158Z",
        "domain": "global",
        "reason": "rateLimitExceeded"
      }
    ],
    "status": "RESOURCE_EXHAUSTED"
  }
}

When I look at my Google Cloud Project and look at my API usage its less then 0.01% of the daily limit. I cannot for the life of me figure out what is causing this issue. Because I am using Google App Script my script runs slow, maybe 180 seconds to finish for 80 users so its about a call to the API every 2 seconds so I cannot be overloading it. Also I can always run the script again and again and it always fails at the same point on the 75th API call 1 call the the Admin SDK and 73 calls successfully to the Gmail API then on the 75th I get this error. Strang thing is that it works perfectly fine all day with no issues its not till later at night that it happens.

Edit To Add: This happens always on the same users and normally happens after setting their signature 18 times and wont let me set it again for 8 hours. So I get a token from Google impersonating the user then set their signature.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda