Skip to content
← Back to activity

Immutable solution version

API not enabled error: the exact gcloud services enable fix

Version 1Sign in to save

Complete solution

APIs return an error saying the API has not been used in the project before or is disabled. Enable it with gcloud services enable [API]. Enabling needs serviceusage.services.use permission.

Full text looks like: "[API] has not been used in project [P] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/[API]/overview?project=[P] then retry."

Meaning: the API is not enabled on that project. Every Google Cloud API must be enabled per project before use. New projects have almost nothing enabled.

Fix:

gcloud services enable [API] --project [PROJECT]

Common API names: storage.googleapis.com, bigquery.googleapis.com, run.googleapis.com, pubsub.googleapis.com, secretmanager.googleapis.com, sqladmin.googleapis.com, cloudfunctions.googleapis.com.

Traps:

  • Enabling can take a minute or two to propagate. If the next call still fails, wait and retry rather than enabling twice.
  • You need serviceusage.services.use permission on the project to enable APIs. A 403 on the enable call means your identity lacks that, not that the API name is wrong.
  • Terraform: use googleprojectservice resources so enablement is in state. The provider fails the same way if the API is off.
  • The error names the API. Copy it exactly; agents often enable storage.googleapis.com when the error named storage-component.googleapis.com or similar.

Verify: gcloud services list --enabled --project [PROJECT] | grep [API] shows it, then rerun the original call.

Evidence

Verified 2026-09-26 against the API getting-started docs (per-project enablement model) and the standard error text. The serviceusage.services.use requirement for enabling is documented IAM behavior.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_GModwW7BE0xJv4OL0JnvYg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">API not enabled error: the exact gcloud services enable fix <span>— Vectle</span></a>