1
votes

I'm trying to set a filter to a GSheet with appscript but when I try to run the script appears a popup with:

Google Sheets API has not been used in project blackbox-6831xxxxxxxxx5 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/sheets.googleapis.com/overview?project=blackbox-6834xxxxxxxxxx5 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

When I try to reach that link the console returns me:

The API "sheets.googleapis.com" doesn't exist or you don't have permission to access it

All the other scripts that interact with GSheet API works perfectly. I have problems only with:

Sheets.Spreadsheets.batchUpdate({'requests': [request]}, ss.getId());

P.S. I'm the admin

1

1 Answers

2
votes

If you don't access directly to the URL, how about going to API console from the script editor and enabling Sheets API? The flow is as follows. Even if you tried this, when the same error occurs, there may be other problem.

Enable Sheets API v4 at API console

  • On script editor
    • Resources -> Cloud Platform project
    • View API console
    • At Getting started, click Enable APIs and get credentials like keys.
    • At left side, click Library.
    • At Search for APIs & services, input "sheets". And click Google Sheets API.
    • Click Enable button.
    • If API has already been enabled, please don't turn off.

And then, please confirm whether Sheets API is enabled at Advanced Google Services again.

Enable Sheets API v4 at Advanced Google Services

  • On script editor
    • Resources -> Advanced Google Services
    • Turn on Google Sheets API v4

If this was not useful for you, I'm sorry.