Hi,
I know this has been asked multiple times. But I still cannot get it to work, and am now thinking there is no way to avoid having to re-authenticate from time to time.
I have 'Google Cloud session control' set to 'Never require reauthentication'
I also have 'App Access Control' and added the app ID and set to 'Trusted'
I authenticate via the admin user and everything works. Then a few months later I get the bellow error and have to re-authenticate to get GAM working again:
Traceback (most recent call last):
File "gam/__main__.py", line 49, in <module>
File "gam/__main__.py", line 44, in main
File "gam/__init__.py", line 11756, in ProcessGAMCommand
File "gam/__init__.py", line 9733, in doPrintUsers
File "gam/__init__.py", line 1078, in buildGAPIObject
File "gam/__init__.py", line 1006, in getValidOauth2TxtCredentials
File "gam/auth/oauth.py", line 477, in refresh
File "gam/auth/oauth.py", line 485, in _locked_refresh
File "google/oauth2/credentials.py", line 302, in refresh
File "google/oauth2/reauth.py", line 347, in refresh_grant
File "google/oauth2/_client.py", line 62, in _handle_error_response
google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', {'error': 'invalid_grant', 'error_description': 'Bad Request'})
[28599] Failed to execute script '__main__' due to unhandled exception!
Now, I now that I can run: gam oauth delete and gam oauth create to get back in. But my issue is that I manage the domains for multiple clients. I do not have an admin account on their systems. So each time I have to bug them and call their admin, send them the new URL and get the code back from them.
Is there something I am doing wrong?
p.s. On another related issue, starting about 6 months ago, instead of getting a code after they approve the access, my clients are saying they get a:
This site can’t be reached
127.0.0.1 refused to connect.
So I have to ask them to get me the URL instead.
Any suggestions would be greatly appreciated.