I think I got this working ๐ฎ but I don't fully understand how (python is not really my strong suite). I obtained the
creds
from this stackoverflow answer:
https://stackoverflow.com/questions/56445257/valueerror-client-secrets-must-be-for-a-web-or-installed-app and just commented out everything else :ape:
```
creds = None
# if os.path.exists("token.json"):
# creds = Credentials.from_authorized_user_file("token.json", SCOPES)
# If there are no (valid) credentials available, let the user log in.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
# flow = InstalledAppFlow.from_client_secrets_file(
# "credentials.json", SCOPES
# )
# # creds = flow.run_local_server(port=0)
SERVICE_ACCOUNT_FILE = 'credentials.json'
creds = service_account.Credentials.from_service_account_file(
SERVICE_ACCOUNT_FILE, scopes=SCOPES)
# Save the credentials for the next run
# with open("token.json", "w") as token:
# token.write(creds.to_json())
return creds