0

I am trying to build an application that will sync a in house calendar solution with the user's google calendar. It all works to retrieve events from the user's local calendar, but the shared calendar we use for things like vacation does not work. I use the Calendar List call to get all the calendars the user can access ( which will return the Id of the vacation calendar ) but whenever I try and use the list event call on the vacation calendar Id I get 404 error. I've double and triple checked that the Id is correct and the URL is formatted correctly, but the events never load.

I have noticed that the Oauth for my app states that it is allowing access to "Calendars that you own". I am thinking that it may be a permission issue since the user I'm testing with does not own the vacations calendar. I've tried adding every single scope I can find to the permissions for the app but it still gives me a 404 when trying to get the events from the calendar.

Does anyone have any scopes that I need to add to get this to work? Any suggestions on anything else to try?

Tried adding every scope to the Oauth app. Did not work, still says "Calendars that you own" on the Oauth screen.

I believe it's an Oauth scope permission issue because when I use "Try it" ( https://developers.google.com/calendar/api/v3/reference/events/list?apix=true#try-it ) I can successfully retrieve the events with the calendar Id. Also the Oauth screen for the "Try It" does not have the "Calendars that you own" stipulation

This is the error I recieve:

"error": {

"errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } }

  • Does this answer your question? [Google Calendar API don't return shared calendars](https://stackoverflow.com/questions/60036292/google-calendar-api-dont-return-shared-calendars) – SputnikDrunk2 Feb 03 '23 at 02:32
  • Thanks for the response, I saw that but unfortunately it doesn't. I know it's possible since when I use the "Try It" ( https://developers.google.com/calendar/api/v3/reference/events/list?apix=true#try-it ) I can retrieve the calendar. But also the Oauth screen for try it does not have the "that you own" stipulation of calendars for events – Johan Donkersloot Feb 03 '23 at 02:59
  • Could you share more details about the error received? Try to always include a [minimal example](https://stackoverflow.com/help/minimal-reproducible-example) that reproduces the issue. – Gabriel Carballo Feb 03 '23 at 15:27

1 Answers1

0

To anyone who has a similar issue, I wasn't updating the scopes in the parameters that I was passing to the google oauth server url which was the issue