✅ Fixing Google Drive “The API developer key is invalid” (Google Picker Error)
This error comes from Google Picker, not Google Drive.
Google Picker requires a valid API Key, and if the API Key is missing, incorrect, or restricted, you will see:
The API developer key is invalid
To fix this, follow the instructions below.
🔧 Step-by-Step Setup Guide (Google Drive + Google Picker)
1️⃣ Enable Required Google APIs
Go to Google Cloud → APIs & Services → Library
Enable these APIs:
-
Google Drive API
-
Google Picker API
-
(Optional) Google People API
2️⃣ Create Required Credentials
Go to Google Cloud → APIs & Services → Credentials
You must create three items:
✔ A. API Key
Used by Google Picker popup.
✔ B. OAuth Client ID
Used to log in with Google Drive.
✔ C. OAuth Client Secret
Also used for OAuth login.
3️⃣ Configure the OAuth Redirect URI
Copy the redirect URL from your Stackposts settings, for example:
Paste it into:
Google Cloud → Credentials → OAuth Client → Authorized redirect URIs
4️⃣ Configure the API Key (IMPORTANT)
Your API Key must be:
-
Active
-
Not restricted incorrectly
-
Allowed to use Google Picker + Drive API
If you want to restrict it, use:
Application restrictions:
→ HTTP referrers (websites)
Allowed domains:
🎉 After Completing These Steps
Google Drive will login correctly using OAuth,
and Google Picker popup will work using your API Key,
so the error:
"The API developer key is invalid"
will disappear.