0

I am currently building a NodeJS backend app that is querying the Google Calendar API. I have setup a new project on Google Cloud API platform and have generated all the required credentials. As stated by the google calendar API page, the allowed queries per day is 1,000,000. Since I am only querying for testing purposes at the moment, I am sure that I haven't even hit a 100. Yet whenever I try to query the API it returns the error: "The API returned an error: Error: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup." Also I have noticed that the dev console has generated a API key for me. Where am I supposed to put that? My initial thinking is that Google API requires me to perform an additional signup using some CLI tools or something along those lines to signup. If not, where am I supposed to sign up? Thanks in advance.

Note: I already have all the information from the cloud platform such as client_id, client_secret, project_id.

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
Archit Kithania
  • 177
  • 4
  • 13
  • Possible duplicate of [Keep getting a "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup" when attempting to google plus login on my web app](https://stackoverflow.com/questions/19335503/keep-getting-a-daily-limit-for-unauthenticated-use-exceeded-continued-use-requ) – pinoyyid Feb 09 '19 at 23:03

2 Answers2

0

In "Error: Daily Limit for Unauthenticated Use Exceeded", they key word is Unauthenticated. Your request to the Calendar API is missing an OAuth Access Token. You will need to research Google OAuth.

This question has been answered many times. Please learn how to search SO for similar questions whenever you post a new question. https://stackoverflow.com/search?q=google+oauth+%22daily+limit+for+unauthenticated%22

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
  • Thanks for your reply. Before posting this question I believe I did do my part in researching for the question and only resorted to SO after my research had failed. I had encountered the threads you generously linked me to. Each one of those threads claim that I am missing certain credentials but to the best of my knowledge, i think i am providing all the required credentials. Below is my credentials.json file with the sensitive content blocked out: (Thanks for all your help) – Archit Kithania Feb 10 '19 at 10:42
  • { "installed": { "client_id": "XXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com", "project_id": "XXXXXXXXXXXXXXXXXXXXXXXX", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_secret": "XXXXXXXXXXXXXXXXXXXXXXXX", "client.key": "XXXXXXXXXXXXXXXXXXXXXXXX", "redirect_uris": ["XXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXX"] } } – Archit Kithania Feb 10 '19 at 10:42
  • the issue is not that you don't have app credentials, but that those app credentials haven't been used to create an Access Token to form part of your calendar request. You should go and make sure you understand how Google OAuth works and then decide how it should be applied to your use case. Your question, as asked, cannot be answered. – pinoyyid Feb 10 '19 at 11:07
0

To anyone who comes across this post in the future. I fixed the issue by using the project generated by Google Calendar API site (https://developers.google.com/calendar/quickstart/nodejs) by clicked the big blue "Enable the google calendar api" and then changing the name of the quickstart project that was generated. I don't know why it works now but it does and it's been working quite stably so far. Lets see how to goes.

Archit Kithania
  • 177
  • 4
  • 13