Error Messages

You may encounter the following error messages while using the API Connector add-on for Google Sheets. refused to connect

Similar to the “ScriptError: Authorization is required to perform that action” error message, this error from Chrome occurs when logged in into multiple Google accounts at the same time. This is a known bug, so hopefully will be fixed by Google at some point. Until then, you can resolve this issue by logging out from all other accounts before running the add-on, or by opening in a new incognito window.

ERROR: Please enter request name

All API requests must have a name before they can be run. This is true even if you don’t save the request. Enter a name (as a best practice, choose a name that will easily differentiate the request from other API requests in your sheet).

ERROR: Please enter API URL path

All API requests must contain an API URL. This URL should consist of at least a domain name and endpoint, e.g. Optionally, it can also contain query strings, e.g.

ERROR: Please enter destination sheet

Before running an API request, set a destination sheet for the output. To set a destination sheet, you can click on a tab in your worksheet and then click Set to choose that sheet as the destination. Alternately, you can type in your tab name directly.

ERROR: Destination tab doesn’t exist

Your output tab must exist before you choose it as a destination. If you enter a tab name that hasn’t been created yet, you’ll receive this error message. To resolve, first create the tab in your spreadsheet, and then Set it as your destination tab.

ERROR: Pagination can not be applied to multi-query requests

Pagination handling and multi-query requests both cause API Connector to run multiple API requests in a single call, so they can’t be used together. To resolve, please remove pagination handling (located under Output Options) or make sure that you’ve entered only a single URL into the API URL Path field.

Failed to run request

This error indicates that the request is unable to complete successfully, but didn’t return any specific information about the cause of the problem. The primary cause of this error is a request that takes too long to complete and therefore hits Google’s 6 min/request processing limits as described here.

To address, try any or all of the following:

  • reduce the size of your request. Most APIs provide some mechanism for limiting response size via query strings that filter for date or type.
  • change the report style to “compact”, as this is the fastest mode.
  • if you are using pagination handling, reduce the total number of fetches.
  • use JMESPath filtering (paid feature) to reduce the number of fields printed into your sheet.

Failed to save request as the name already exists.

All API requests must have a unique name. If you re-use a name that already exists, the request will not save. To resolve, change the request name and retry.

Internal error executing the custom function

This error comes from Google, and means that your custom function has taken too long (more than 30 seconds) to execute.

To address, run your request using the standard sidebar method rather than with the IMPORTAPI() custom function.

Request failed: Access not granted or expired.

This error occurs when you use the OAuth 2.0 connection feature of API Connector. It means your connection hasn’t been activated, or access has expired. To resolve, navigate to Create > Manage connections and make sure your OAuth 2.0 connection is active.

Request failed: Attribute provided with invalid value: Header:HeaderKey

This means you’ve entered an invalid header key. Please check your API documentation and make sure you’ve entered the header key exactly as written; e.g. if the header key is ‘api-key’ make sure you haven’t entered ‘apikey’. Also double-check that you haven’t inadvertently pasted in an errant space or other character at the beginning or end of your header key.

Request failed: Bad request

This means the API URL hostname is malformed. A request like http://87000 would trigger this error. Make sure you’ve entered a valid API URL, including a full hostname.

Request failed: DNS error

This means the server you’re trying to reach doesn’t exist or isn’t responding. Check if your server has reported any outages. If not, double-check your API URL and run again.

Request failed: Expected argument of type object, but instead had type boolean

This means that the server has responded with a boolean, i.e. ‘true’ or ‘false’, instead of a standard JSON object. API Connector only supports JSON, XML, and text/CSV responses (and receiving a true/false response to your request usually indicates some issue with the request itself).

Request failed: Invalid argument

This occurs when your URL contains an invalid character, like a space or bracket. There are 2 common causes of this error:

  1. copying & pasting code snippets like ‘GET’ into the API URL path box. This field can only accept a valid URL.
  2. not replacing example variables with actual values:

Request failed: Invalid POST body data

This error occurs when your POST body is incorrectly formatted. Ensure your POST body is valid JSON. Consult this article for more detailed instructions: Add a Request Body to a POST Request

Request failed: Server responded with an error (###)

This error message occurs when the platform you’re trying to connect to refuses to run your request and has returned an HTTP Response Status error code. This error code is displayed within the parentheses (you can see a listing of all HTTP error codes and their explanations here:

To troubleshoot this error, first click “show response” to see the exact error message returned by the server. This will often alert you to the specific nature of the problem.

In general, common causes of server errors include:

  • you have entered a non-existent or malformed API URL. Your API URL should look like a standard web URL, and shouldn’t include special characters like ‘{‘ or ‘<‘.
  • your request contains misspelled or missing Header keys. Double-check the requirements; if you need to enter a header key named ‘api-key’, it won’t work with ‘apikey’.
  • the API endpoint only accepts HTTP POST requests but you’re sending a GET request (or vice versa)
  • your POST request contains a malformed or missing POST body
  • you’ve included an invalid parameter (e.g. ‘num=50’, when the value of ‘num’ must be less than 20)

To resolve, please check the documentation of your API service, and ensure your request matches all requirements exactly. Make sure you’ve replaced any example variables with the actual value, e.g. a variable like {your API key} should be replaced by your actual API key.

Request failed: Server response not in JSON, XML, or CSV format

This error occurs when the server responds with data in an unsupported format. Below are some known causes of this error:

  • You’ve entered a ‘regular’ URL rather than an API endpoint, so the server attempts to return the website in HTML format.
  • You’ve installed anti-bot / anti-hacker software (e.g. BadBot Protection by SiteGuarding), and it returns an HTML page to block your request. To check if this is the case, try running your request in an API tool that can display HTML (e.g. Postman), to see if your antibot software returns a warning page.
  • Your request contains an invalid JMESPath expression.

Request failed: This action would increase the number of cells in the workbook above the limit of 5000000 cells.

Google Sheets permits a maximum of 5 million cells (documentation) per sheet, including empty cells. Therefore, you will see this error message from Google if your request would cause your sheet to surpass the limit. To address, try any or all of the following:

  • Run your request in a fresh new sheet
  • Split your requests into separate worksheets
  • Limit the size of the data response you’re requesting
  • Delete any unused tabs, rows, and columns from your worksheet, as that may free up enough cells to run your request.

Request processed, no records found

This is more of a notification than an error message. It means that there is no issue with the setup of your API request, but the API service returned an empty response.

ScriptError: Authorization is required to perform that action

This is an error from Chrome that sometimes occurs when you have multiple Google accounts open in the same session. To resolve, sign out of your other accounts, or re-open the add-on in a new incognito window.

Service invoked too many times for one day: urlfetch

This error message comes from Google itself. Google has quotas on its usage, as described here: A URL Fetch call is a request to get a URL, so one API request is one URL fetch call, and URL Fetch calls are limited to 20,000/day for consumer accounts.

Please note that Google applies this limit to each individual account (each email address), and sums together all the fetch calls from all the sheets you’re using. This includes all scripts, functions, and other add-ons that you may be running in addition to API Connector. Unfortunately Google doesn’t provide any breakdown of where URL fetch calls come from, or any indicator of how close you are to the limit, so you will need to review your sheets manually for excess URL fetch calls. Pay attention to any time-based triggers in your scripts, as well as functions like =importJSON() and =GoogleFinance(), as these may produce URL fetch calls every minute.


In some cases, API platforms will accept a request but return an error message containing additional requirements or information as their response. In those cases, their custom error message will be displayed in the output sheet.

2 thoughts on “Error Messages”

  1. Hello, I have used your template and I think I follow the configuration steps well but it gives me the following error:

    ERROR: Pagination can not be applied to multi-query requests.

    • Hi there, pagination handling is a function that loops through a URL and runs a request multiple times. Multi-query results run through a list of URLs and run multiple requests in a single call. Since these 2 functions both run multiple requests, they can’t be used together. To resolve, please remove pagination handling (under Output Options) or make sure you’ve entered only one URL into the URL field. I’ll add this error message to the list, thanks for pointing it out!  


Leave a Comment