The Google Calendar OAuth consent screen does not present the sensitive scopes

I’m testing a Google Calendar App followed the Java tutorial of Quick Start, I configured the ../auth/calendar scope, but the OAuth consent screen only present the ../auth/calendar.readonly scope, so my app can read events but can not write events, the error message as below:

Did I miss something?

1 Like

Hello @Rain ,

Welcome to Google Cloud Community!

You’re on the right track, but I think during the OAuth consent screen, you might have only granted the read-only permission. This explains the 403 error “ACCESS_TOKEN_SCOPE_INSUFFICIENT” when your app tries to write events.

You have to make sure that your application clearly requests full access to the calendar, including reading and writing events.

The Google Developers Console allows you to define the requested scopes within the “OAuth client IDs” section for your project. Make sure to include the full ../auth/calendar scope there.

If you already went through the consent flow and only granted read-only access, you need to re-authorize your app to grant full permissions. You can achieve this by revoking the existing access token and initiating a new OAuth flow requesting the full ../auth/calendar scope.