Google Access Token not refreshing

Whilst refreshing the Google Access token (using the anvil function: anvil.google.auth.refresh_access_token(refresh_token)) The refresh token is saved and sent to the function.

I receive the error InternalError: Could not retrieve app files from Google. Try renewing your app file permissions in the Anvil IDE. (invalid_request; Missing required parameter: refresh_token)

I’ve enabled Email under the Google Service and checked this states Enabled.

error traceback:

InternalError: Could not retrieve app files from Google. Try renewing your app file permissions in the Anvil IDE. (invalid_request; Missing required parameter: refresh_token)
at /downlink/anvil/_threaded_server.py, line 412
called from /downlink/anvil/server.py, line 47
called from /Google/Tasks.py, line 22

This is a new error over the last 1 week approx.
Has there been something changed on the anvil system that would cause this?

Hi @stu,

Most likely what’s happened is that your app’s authorisation has expired (or been pushed out - Google only allows a few authorisations per app per user, so if you create too many some old ones stop working) - if you remove the Google service and re-add it, does it work again?

Thanks @meredydd,

I was concerned that removing the google service would lose the saved app_files but they re-appeared upon reactivating the google service without having to add them again.

Thanks.