> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tester.army/llms.txt
> Use this file to discover all available pages before exploring further.

# HTTP Basic Auth

> Save HTTP Basic Auth credentials so the TesterArmy agent can access protected staging and preview sites during test runs.

If your staging or preview site is behind HTTP Basic Authentication, save credentials in TesterArmy so the AI agent can access it during test runs.

<img src="https://mintcdn.com/tester-army/cxPvc8T8okiKYoP3/images/basic-auth.png?fit=max&auto=format&n=cxPvc8T8okiKYoP3&q=85&s=c79302368fcc0b60fc9b279ecf72e8ad" alt="HTTP Basic Auth browser prompt" width="2180" height="897" data-path="images/basic-auth.png" />

## Setup

1. Go to **Integrations → Site Protection**.
2. Click **Set up** on the HTTP Basic Auth card.
3. Enter the **username** and **password**.
4. Click **Save**.

Credentials are stored encrypted and sent automatically with every test run for that project.

## Troubleshooting

### Basic auth prompt still appears

Check that the credentials are saved under **Integrations → Site Protection**, not under app test accounts.

### `401 Unauthorized`

The saved HTTP Basic Auth username or password is likely wrong. Confirm the same credentials work in a normal browser, update the Site Protection settings, and retry the run.

### App login still fails

HTTP Basic Auth only unlocks the site before the app loads. If the app itself has a login form, also add [Test Credentials](/auth/credentials).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.