1
0
Fork 0

fix retrieving google oauth token

This commit is contained in:
Youssef Badzi 2025-01-08 16:27:43 +01:00
parent 5a050b0ca3
commit be66d04bf3
No known key found for this signature in database
GPG key ID: 4D8586DB91437E39
2 changed files with 7 additions and 1 deletions

View file

@ -59,6 +59,10 @@ def google_api_get(email, url):
if r.status_code == 401:
# Go use the refresh token
refresh_authorization(email)
# Force use of the new token
headers = dict(
Authorization="Bearer %s" % get_google_access_token(email),
)
r = requests.get(url, headers=headers)
logger.info("I got a %s", r.status_code)
if r.status_code == 200: