I am using the Google API discovery module to build a gmail api that fetches some labels from my inbox using Google Cloud Functions.
- https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.discovery-module.html
Solved! Go to Solution.
If I am reading the post correctly, I am sensing that the call to gmail is happening from Cloud Functions. Your Cloud Function service is running under the auspicies of a Service Account already. If it were me, I'd be looking to create a Service Account that your Cloud Function runs as that you then give authorization to call gmail. When your Cloud Function then calls gmail, you will already be implicitly authorized for gmail. There are no keys involved at all ... only configuration of the environment.
If I am reading the post correctly, I am sensing that the call to gmail is happening from Cloud Functions. Your Cloud Function service is running under the auspicies of a Service Account already. If it were me, I'd be looking to create a Service Account that your Cloud Function runs as that you then give authorization to call gmail. When your Cloud Function then calls gmail, you will already be implicitly authorized for gmail. There are no keys involved at all ... only configuration of the environment.