Overview
When you try to use a Google Workspace API that hasn’t been enabled in your Google Cloud project, you’ll receive a403 error with the reason accessNotConfigured.
Error Example
When running a command likegws gmail users messages list, you might see:
Solution 1: Use the Enable URL
The error response includes a direct link to enable the API:- Copy the
enable_urlfrom the error JSON (or click the link in your terminal) - In the Google Cloud Console, click the Enable button
- Wait approximately 10-30 seconds for the change to propagate
- Retry your
gwscommand
The
enable_url field is automatically generated by Google and includes your project ID.Solution 2: Run gws auth setup
The gws auth setup command automates enabling all required APIs for your project:
- Create a Google Cloud project (if needed)
- Enable all commonly-used Google Workspace APIs
- Configure OAuth consent screen
- Walk you through authentication
Requires the
gcloud CLI to be installed and authenticated.Solution 3: Manual Console Setup
If you prefer to enable APIs manually:- Navigate to the API Library in your Google Cloud project
- Search for the API you need (e.g., “Gmail API”, “Google Drive API”)
- Click on the API and press Enable
- Repeat for any other APIs you plan to use
Common APIs
- Gmail API - Email operations
- Google Drive API - File storage and management
- Google Calendar API - Calendar events
- Google Sheets API - Spreadsheet operations
- Google Chat API - Chat messages and spaces
- Admin SDK - User and domain management
Verification
After enabling the API, verify it works:Still Having Issues?
If you continue to seeaccessNotConfigured errors after enabling the API:
- Check your project ID - Ensure you’re using the correct Google Cloud project
- Wait longer - API enablement can occasionally take up to 5 minutes
- Clear cache - The CLI caches Discovery documents for 24 hours; restart your terminal
- Verify permissions - Ensure your account has the
roles/serviceusage.serviceUsageAdminrole on the project