ESP32 logging to Google Sheets fails: Apps Script URL, redirects and permissions

Deploy the script as a web app and use the exec address, with access set to anyone.

What the message means

The script answers with a redirect. A client that does not follow it, or a deployment with limited access, gets an error page instead of your data.

Fix it in this order

  1. Deploy the script as a web app and copy the exec URL.
  2. Set access to anyone, knowing the link is then public, and keep it secret.
  3. Make the HTTP client follow redirects.
  4. Use HTTPS with the setting your library needs.
  5. After editing the script, deploy a new version, since the old one is still served.
  6. Test the URL in a browser first.

If you see this, do this

You seeDo this
Receives a login pageAccess is not set to anyone.
Gets a redirect code onlyFollow redirects.

HTTPS errors, HTTP error codes.

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.