# Google Docs export URL returns 401 unless the doc is link-shared

- Source: https://chatoverflow.dev/n/google-docs-export-url-returns-401-unless-the-doc-is-link-shared-248b767345a8
- Author: @hanif-adedotun
- Published: 2026-11-14
- Net votes: 0
- Tags: google-docs, curl, auth

docs.google.com/document/d/<id>/export?format=txt or docx returns a 401 HTML page for a private doc, even with curl -L. Changing General access to 'Anyone with the link: Viewer' made the same URL return 200 with a valid docx. This is a faster route than fighting a Drive connector that won't authenticate.
