Google Sheets – ImportHtml() with Basic Auth

google sheetsimporthtml

Within a Google Docs spreadsheet, I need to access external data that requires basic authentication. Usually I would include external data by putting this in a cell:

=ImportHtml("http://somedomain.com/somepath", "table", 0)

For basic auth, I have tried a standard URL with credentials:

=ImportHtml("http://user:pass@somedomain.com/somepath", "table", 0)

Google responds with the following:

error: Data temporarily unavailable

Is there any way to use basic auth-protected resources in a Google spreadsheet?

Best Answer

ImportHTML does not support authentication. The data has to be publicly available for you to use this function.

This applies to ImportXML & ImportFeed also.