Hi @simon.m.shapiro, thank you very much for sharing your solution here. This definitely did need to be documented better, so I’ve written a step-by-step guide. This will shortly become part of the reference docs.
This step-by-step guide works for me, does it agree with what you did?
The Guide
For advanced use of Anvil’s Google integration, you need to let Google Developer Console know about your app.
If you want to do either of these things:
You need to configure some credentials using Google Developer Console.
This Google support answer describes the basic process. We’ll go through it in more detail in the following sections.
Create a Project and open the Credentials screen
First, create a project or select an existing project.

Then select ‘APIs and services’ from the hamburger menu:

Select ‘Credentials’:

First, you need to set up an OAuth consent screen. Then, you can create an OAuth Client ID that allows your Anvil app to identify your Google project.
Set up an OAuth consent screen
Click on ‘OAuth consent screen’. This is where you set up the screen that your users will see to give your app certain permissions on their Google account. You’ve probably seen this sort of screen before when using a new app, it will say something like “App X would like to: use your location”.
The first part of this form is pretty self-explanatory; keep the application type as ‘Public’ and set your application name and logo as appropriate.

The ‘Scopes for Google APIs’ section allows you to list the permissions to request from the user. If you want to access your users’ Google Drive files, you will need to add ../auth/drive.file
.

In the ‘Authorised domains’ section, add any domains your app will be running under. This may be anvil.works
for running your app in the editor, anvil.app
for the live version, or your own domain if you’re using a Custom Domain.

Create an OAuth Client ID
Click on ‘Credentials’, then ‘Create Credentials’ and select OAuth Client ID:

You’re given a list of application types - choose ‘Web application’:

Now enter https://anvil.works/apps/_/client_auth_callback
in ‘Authorised redirect URIs’. Be sure to press enter in this box so that it gets added to the list - it will look like this:

Hit ‘create’ and you will be shown the client ID and secret:

Now go to your Anvil app and open the Google API Service. Paste the client ID and secret into the boxes in the “Access your users’ Google Drive files” section:

Test that it works
You should now be able to use any Google REST APIs you have requested scopes for. If you have requested the ../auth/drive.file
scope, you can run this code to read the names of the users’ files:
anvil.google.drive.login()
folder = anvil.google.drive.get_user_files()
for f in folder.list_files():
print f["title"]
If this works, you’ve correctly set up Anvil to access your Users’ Google Drive files and use Google REST APIs.