# Basic Auth

Use this method when the external API requires a username and password in the HTTP authorization header.

### What this method does

Nected encodes `username:password` using Base64 and sends:

```http
Authorization: Basic <base64(username:password)>
```

### When to use

* Legacy APIs only support Basic Authentication
* Internal trusted systems still rely on username/password credentials

### Required fields in Nected

* **Username**
* **Password**

![Basic Auth configuration form](https://4290782554-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLg716fCfV8IUwXQygkTG%2Fuploads%2FNCBBPhzYF7kNtAkl6AeW%2Fimage.png?alt=media\&token=e0f8f8e4-e3fd-47fc-af60-1be410992ce5)

### Step-by-step setup

1. Start from either location:
   * **Path A**: Navigate to **Security > Authorization** and click **+ New Authentication**.
   * **Path B**: Open the **REST API connector configuration sidebar** and click **Create Authentication** from the Authentication dropdown.
2. Select **Basic Auth**.
3. Enter `Username` and `Password`.
4. Save configuration.
5. Attach/select this authentication in the integration/API request step.
6. Run test requests and confirm provider response.

### Validation checklist

* Username/password are current and active.
* Target endpoint expects Basic Auth for this route.
* Request is sent over HTTPS.

### Security considerations

* Always use HTTPS; Basic Auth is not safe over plain HTTP.
* Keep credentials scoped to least privilege.
* Replace with OAuth/API key where possible for stronger controls.

### Common errors and fixes

* **401 Unauthorized**: username/password mismatch.
* **Credentials accepted locally but not in Nected**: verify escaped/special characters.
* **Frequent failures**: password rotation not updated in Nected config.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nected.ai/nected-docs/security/external-api-authentication/basic-auth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
