CleanedWeb

HTTP error

HTTP 401 Unauthorized

HTTP 401 Unauthorized means the request lacks valid authentication credentials. Despite the name, it is about who you are (authentication), not what you may do. A client that is known but not allowed gets 403 instead.

Why a pipeline gets a 401

A server should send a WWW-Authenticate header that names the scheme it accepts. Read it.

What to do

  1. Check that the credential reaches the request, is unexpired, and is the right one for this environment.
  2. Refresh a token and retry once. Do not loop on the same bad credential; repeated failures can lock an account.
  3. Keep keys out of URLs, logs, screenshots and source control, and load them from your secret store.
  4. For a website's login wall, do not script a sign-in with someone else's credentials or work around it. Use the official API, or ask for access.

In CleanedWeb

Server requests authenticate with Authorization: Bearer <API_KEY>, using a key from the workspace. A 401 means there was no credential or you are not signed in: supply a valid key. Expired or revoked keys are rejected, so check the key's expiry and revocation state in your workspace. Keys carry scopes (read, run, results); a key that is valid but not tied to a workspace account or lacking permission answers 403.

CleanedWeb reads public pages only, never pages behind a login. For a source that needs a login, a 401 is a limit of the approach, not something to configure around.

Tools and docs

Related terms

All glossary entries

Build an API from a website

CleanedWeb turns a website into a maintained REST API that returns structured records, with a versioned schema and repairs when the site changes.