Don't invoke application default credentials logic when developerKey is provided (#347)
diff --git a/googleapiclient/discovery.py b/googleapiclient/discovery.py
index 6291f34..1266883 100644
--- a/googleapiclient/discovery.py
+++ b/googleapiclient/discovery.py
@@ -355,8 +355,9 @@
scopes = list(
service.get('auth', {}).get('oauth2', {}).get('scopes', {}).keys())
- # If so, then the we need to setup authentication.
- if scopes:
+ # If so, then the we need to setup authentication if no developerKey is
+ # specified.
+ if scopes and not developerKey:
# If the user didn't pass in credentials, attempt to acquire application
# default credentials.
if credentials is None: