https://cloud.google.com/docs/authentication/provide-credentials-adc Are you supporting the default credentials for GCP APIs? From the code it looks like you require an api_key to be passed