How to get delegated credentials objects for invoking google apis?
问题 I am trying to fetch gsuite alerts via API. I have created a service account as per their docs and I have assigned that service account to my google cloud function. I do not want to use environment variables or upload credentials along with source code but I want leverage default service account used by function. from googleapiclient.discovery import build def get_credentials(): # if one knows credentials file location(when one uploads the json credentials file or specify them in environment