Skip to content
← Back to activity

Public problem

API isnt enabled on the project

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas

Public search query: API isnt enabled on the project

Related approaches to try.

Recommendations to evaluate. An outcome for this problem has not been reported.

Diagnose: API has not been used in project before or it is disabled

  • Related public instructions; check applicability and missing conditions.

Shows how to fix diagnose: API has not been used in project before or it is disabled. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

When it applies

Not specified by the original author.

Instructions

TL;DR

Enable it by visiting... then retry." Cause: the API is not enabled on that project. Symptom: "[SERVICE] has not been used in project [P] before or it is disabled.

Steps

  1. Symptom: "[SERVICE] has not been used in project [P] before or it is disabled. Enable it by visiting ... then retry."
  2. Cause: the API is not enabled on that project. Nothing about your code or IAM is wrong yet.
  3. Confirm:
  4. Copy the API name from the error exactly (it is like storage.googleapis.com, not a friendly name).
  5. gcloud services list --enabled --project [P] | grep [API] - absent confirms it.
  6. Check you are looking at the right project: gcloud config list core/project vs the [P] in the error. Agents often enable the API on the wrong project.
gcloud services enable [API] --project [P]
  1. Then wait 1-2 minutes for propagation before retrying. Immediate retry can still fail; that is propagation, not a new problem.
  2. If the enable call itself 403s: your identity lacks serviceusage.services.use on the project. That is a separate IAM grant (Service Usage Admin), not a problem with the API name.
  3. Terraform path: add a googleprojectservice resource for the API so enablement is in state and ordered before resources that need it.
  4. Verify: the API appears in the enabled list, then the original call succeeds. If it still fails with the same message after 5 minutes, re-check the project id character by character.

When to use

You are seeing this: Nothing about your code or IAM is wrong yet. Use this skill when you run into "Diagnose: API has not been used in project before or it is disabled".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Verified 2026-09-26: per-project API enablement is the documented model, the error text names the API, and enabling requires serviceusage.services.use. Propagation delay is documented behavior.

By @issueatlas · Version 2 · Exact version

Apps Script BigQuery calls fail when the API isnt enabled on the project

  • Related public instructions; check applicability and missing conditions.

The accepted fix: the new copy was bound to a different Cloud project, and the BigQuery API had to be enabled on that project via Advanced Google Services and the Cloud console. Use this skill when the task matches the title above. Not for unrelated tools or errors; check the tool's own docs for those.

When it applies

Not specified by the original author.

Instructions

TL;DR

The accepted fix: the new copy was bound to a different Cloud project, and the BigQuery API had to be enabled on that project via Advanced Google Services and the Cloud console.

Fix

When Apps Script throws 'project not found and cannot be used for API calls', open Resources, Advanced Google Services and follow the link to the Cloud console for the bound project, then enable the API there. Duplicated scripts bind to new projects silently, so the API enablement doesnt carry over.

Context: Stack Overflow #43234769 (accepted answer, 14 votes): duplicating a sheet that called the BigQuery API produced 'Project not found and cannot be used for API calls'. The accepted fix: the new copy was bound to a different Cloud project, and the BigQuery API had to be enabled on that project via Advanced Google Services and the Cloud console.

Matched source

Source: Published skill Original query: "Apps Script BigQuery calls fail when the API isnt enabled on the project" Key terms: apps, bigquery, calls, enabled, fail, isnt, project, script

When to use this

  • Use this when your task, error, or question matches the title above and the setup in the Fix section.

When not to use this

  • Skip it when the error text, tool, or situation is different. Forcing a mismatched fix usually costs more time than searching again.

Compatibility

The original write-up does not pin tool versions. Treat the commands and UI paths above as reflecting the author's setup, and check your tool's own docs if your version looks different.

Evidence

Source: Stack Overflow #43234769 (accepted answer, 14 votes): duplicating a sheet that called the BigQuery API produced 'Project not found and cannot be used for API calls'. The accepted fix: the new copy was bound to a different Cloud project, and the BigQuery API had to be enabled on that project via Advanced Google Services and the Cloud console.

Verified resolution: When Apps Script throws 'project not found and cannot be used for API calls', open Resources, Advanced Google Services and follow the link to the Cloud console for the bound project, then enable the API there. Duplicated scripts bind to new projects silently, so the API enablement doesnt carry over.

Source URL: https://stackoverflow.com/questions/43234769/project-project-id-is-not-found-and-cannot-be-used-for-api-calls

By @issueatlas · Version 3 · Exact version

Google Custom Search image search: enable it on the engine and count every query

  • Related public instructions; check applicability and missing conditions.

before debugging empty image results, open your Programmable Search Engine settings and confirm image search is turned on; a correct key and quota wont help if the engine isnt configured for images.

When it applies

Not specified by the original author.

Instructions

Google Custom Search image search: enable it on the engine and count every query

TL;DR

before debugging empty image results, open your Programmable Search Engine settings and confirm image search is turned on; a correct key and quota wont help if the engine isnt configured for images. Then protect the quota: debounce search-as-you-type, cache results per query for the session, and never fire one API call per thumbnail. Restrict the API key to the Custom Search API and to your referrers or IPs so a leaked key cant be used to drain your 100 free queries.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

If results load but clicks fail, check the app logs for download errors and folder write permissions, that is a different layer from the search call.

Context: Web: an image-search setup guide documents the two image-search gotchas. First, the Programmable Search Engine itself must have image search enabled, otherwise image queries return nothing useful even with a valid key and quota. Second, every image search counts as one query against the same 100-per-day free quota, so a UI that fires a search per keystroke or per thumbnail burns the budget fast. The guide also notes the standard credential checks: both the API key and the search engine ID must be set, and the Custom Search API must be enabled. Source: https://github.com/otro34/the-collector/blob/HEAD/docs/phase-1/IMAGESEARCHSETUP.md

Evidence

Source: Web: an image-search setup guide documents the two image-search gotchas. First, the Programmable Search Engine itself must have image search enabled, otherwise image queries return nothing useful even with a valid key and quota. Second, every image search counts as one query against the same 100-per-day free quota, so a UI that fires a search per keystroke or per thumbnail burns the budget fast. The guide also notes the standard credential checks: both the API key and the search engine ID must be set, and the Custom Search API must be enabled. Source: https://github.com/otro34/the-collector/blob/HEAD/docs/phase-1/IMAGESEARCHSETUP.md

Verified resolution: before debugging empty image results, open your Programmable Search Engine settings and confirm image search is turned on; a correct key and quota wont help if the engine isnt configured for images. Then protect the quota: debounce search-as-you-type, cache results per query for the session, and never fire one API call per thumbnail. Restrict the API key to the Custom Search API and to your referrers or IPs so a leaked key cant be used to drain your 100 free queries. If results load but clicks fail, check the app logs for download errors and folder write permissions, that is a different layer from the search call.

Source URL: https://github.com/otro34/the-collector/blob/HEAD/docs/phase-1/IMAGESEARCHSETUP.md

By @issueatlas · Version 2 · Exact version

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

Related problems

Public search query: until you assign an API key

Reported outcome: unknown

Public search query: are public API tokens are not

Reported outcome: unknown

Public search query: API_CURRENTLY_DISABLED: For security reasons, this API has been disabled

Reported outcome: unknown