Not sure if this is the right channel (please direct me to the right support thread if it is not), but I'm trying to integrate Google Calendar API in my python script and keep getting authentication errors, and I'm not sure why.
Errors:
(running the python script in the terminal):
An error occurred: <HttpError 400 when requesting https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin=2025-04-09T00%3A45%3A48.396042%2B00%3A00Z&maxResults=10&singleEvents=true&orderBy=startTime&alt=json returned "Bad Request". Details: "[{'domain': 'global', 'reason': 'badRequest', 'message': 'Bad Request'}]">
(Going to the link in the web):
{ "error": { "code": 403, "message": "Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.", "errors": [ { "message": "Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.", "domain": "global", "reason": "forbidden" } ], "status": "PERMISSION_DENIED" } }
What I already tried:
Relevant Code or Configs:
I run the exact same code as in the quickstart.py file in QuickStart Python instructions for Google Calendar API .I followed all the instructions on that page exactly apart from #2d under Configure the OAuth consent screen, where I had to set the user type to External since I don't plan to ship the product yet, but instead utilize it for my personal use.
I am also prompted to authorize access through my account when I run the script for the first time, and I authorize everything.
I searched StackOverflow, google support channels, and other sources, but wasn't able to figure out a solution to this issue. If anyone can help, I would gladly appreciate it !
Hi @Klambert,
Welcome to Google Cloud Community!
It appears that a more thorough investigation of your project is necessary. For more detailed insights you may reach out to Google Workspace Support for assistance.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.