> For the complete documentation index, see [llms.txt](https://upitranzact.gitbook.io/upitranzact/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upitranzact.gitbook.io/upitranzact/getting-started/api-authentication.md).

# API Authentication

To ensure secure communication, all API requests require the following:

* **Header:** Authorization: "Basic base64(public\_key:secret\_key)"
* **Header:** `Content-Type: application/json`

**Authorization:**

The request must include an **Authorization header** with a **Base64 encoded string** containing your `public_key` and `secret_key` in the format `public_key:secret_key`. Here's an example of how to generate the **Authorization header**:

**Example:**

```javascript
Authorization: "Basic base64(public_key:secret_key)"
```

For example, if your `public_key` is `your_public_key` and your `secret_key` is `your_secret_key`, you would encode this into Base64 and use it as the Authorization header.

**Example Authorization Header (Base64 encoded):**

```javascript
Authorization: "Basic eW91cl9wdWJsaWNfa2V5OnlvdXJfc2VjcmV0X2tleQ=="
```
