AI News
20 Oct 2026
Read 10 min
How to fix 401 Unauthorized download error in 3 steps
Fix 401 Unauthorized download error and quickly restore downloads with proven steps to regain access.
3 steps to fix 401 Unauthorized download error
Step 1: Confirm you have access
- Open the link in a normal browser tab. If a login screen appears, sign in and try again.
- Check the URL for typos, extra spaces, or a missing path. Copy the full link again.
- Make sure your account has permission to the file or folder. Ask the owner to share or grant access.
- If the link is a “signed URL” (from S3, Google Drive, OneDrive, or a portal), check if it expired. Request a fresh link.
- Turn off VPN or proxy and try your normal network. Some services block unknown IP ranges.
- If your company uses SSO or 2FA, complete the extra step and then retry the download.
Step 2: Refresh and send the right credentials
- Sign out and sign in again to refresh cookies and session data.
- Clear your browser’s cache and cookies for the site, or try an incognito/private window.
- If you use an API token, get a new one and use the correct header format:
- Bearer token: Authorization: Bearer YOUR_TOKEN
- Basic auth: username:password (use HTTPS only)
- Sync your device time. Expired or “not yet valid” tokens often happen when your clock is wrong.
- Follow redirects. Many downloads hop between domains. Let your tool follow them.
Step 3: Retry the download the right way
- Browser: After logging in, open the link in the same tab, or right‑click and choose “Open link in new tab.” Try disabling extensions that block cookies.
- curl:
- Bearer: curl -L -H “Authorization: Bearer YOUR_TOKEN” -O “https://example.com/file.zip”
- Basic: curl -L -u “username:password” -O “https://example.com/file.zip”
- wget:
- Bearer: wget –header=”Authorization: Bearer YOUR_TOKEN” -O file.zip “https://example.com/file.zip”
- Basic: wget –http-user=username –http-password=password -O file.zip “https://example.com/file.zip”
- PowerShell:
- $Headers = @{ Authorization = “Bearer YOUR_TOKEN” }
- Invoke-WebRequest -Uri “https://example.com/file.zip” -Headers $Headers -OutFile “file.zip”
What a 401 means (and how it differs from 403)
- 401 Unauthorized: You need valid credentials, or your credentials are missing/expired.
- 403 Forbidden: You are signed in, but the server will not let you access this resource.
Common causes and quick fixes
- Expired session or token: Log out and back in. Regenerate the token. Sync system clock.
- Wrong URL or missing path: Paste the full, exact download link. Avoid trimming query strings.
- Redirects drop auth: Use curl -L or let your client follow redirects; add headers to the final host.
- Private file with no share: Ask the owner to grant view/download or to create a new share link.
- VPN/proxy blocking: Disable it or use an allowed IP. Some sites whitelist regions or networks.
- Browser cookie issues: Use a private window or clear site data and try again.
Platform-specific tips
Cloud storage links (S3, Google Drive, OneDrive)
- Signed URLs expire fast. If expired, generate a new link.
- For S3, use AWS CLI with a logged-in profile if the object is private.
- For Google Drive, make sure it is shared with your account or set to “Anyone with the link” if allowed.
- For OneDrive/SharePoint, ensure you are logged in to the right Microsoft account.
Developer portals and APIs
- Read the docs for the exact Authorization header and scopes required.
- Store tokens in a password manager. Rotate them before they expire.
- When using Postman or similar tools, set “Follow redirects” and include auth on redirects.
Corporate networks
- Check if the site is blocked by a firewall or secure web gateway.
- Ask IT to allow the domain or to add your IP to the allowlist.
- Sign in to your SSO portal first, then click the download link.
If the issue is on the server side
Sometimes you did everything right, but the server still returns 401. Share clear details with support:- Exact URL (redact tokens), time, and your account email
- Steps to reproduce, and the tool you used (browser, curl, wget)
- Any request ID from response headers or the error page
- That your account has download permission
- That the share link or signed URL is active
- That auth is allowed across redirects or subdomains
Why these three steps work
- Step 1 removes simple blockers: missing access, wrong link, or expired share.
- Step 2 ensures your identity is fresh and sent in the right format.
- Step 3 makes your client follow the same path the site expects, keeping auth intact.
(Source: https://www.wsj.com/tech/ai/bill-grosss-ai-tool-could-supercharge-the-number-of-startups-27187080)
For more news: Click Here
FAQ
Contents