Google sheet Error- importdata() shows HTML code on google sheets

It tried importing data from Redash to google sheets via API key but the result on G-sheet returns HTML code. Can anyone help with this?

Atttaching SS for reference

image

What happens if you visit the redash.zomans.com link in your browser? Does the result download?

It looks like when IMPORTDATA hits the URL it’s being redirected to a login page.

Yes, it asks for login in case there is no current session is active otherwise it opens a home page(attaching ss). Also, the URL with the API key downloads the result when entered in any browser’s search bar.

I wonder if you struck this issue: https://github.com/getredash/redash/issues/4805

Can you confirm that the query in question has group permissions assigned to it?

Just to confirm: you try this from an incognito browser where you haven’t logged-in to Redash, right?

Yes. Also, if I visit the API URL via a browser that downloads the data in .csv format and I think that verifies it too.

Nope, using signed in browser only.

Sounds like a permissions error then. The API download link should work when visiting from an incognito browser. If it requires you to be logged-in then of course it won’t work within Google Sheets either.

Check the data source permissions for query 37689 to make sure it’s part of at least one group.