Confluence does not include "token-auth" path in download URL provided to Companion.
- Have a Confluence instance with transparent SSO (e.g. load balancer that redirects requests to SSO then back to Confluence)
- Try to allow Companion requests to hit Confluence instances directly for URLS like "<base-url>/download/token-auth/attachments/*"
Companion should be able to download the file
Companion hits the SSO authentication for the download request.
Configure load balancer/reverse proxy to direct "<base-url>/download/attachments/*" URLs to Confluence bypassing the SSO.
Upgrade Confluence Previews bundled plugin/app to attached version which includes this fix (update through "Manage apps" in Confluence administration by using "Upload app")