> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer/basicauth.md).

# BasicAuth

## Encoding API Key <a href="#encoding-api-key" id="encoding-api-key"></a>

To encode API keys, follow the authentication method below.

1. Indicate Authorization: Basic "user-uid:api key" in the header.
2. Replace the "user-uid" and "api key" values with the necessary ones.
3. Encode the whole string in [base64](https://en.wikipedia.org/wiki/Base64).

**For example**:

The following **user-uid:api key** string `777c31b3-a85f-4823-93a5-9055d1b:cGEFFLjYuUCtmerXlhTfAdaPpYVnXDJZmg`\
results in a\
**base64** `Nzc3YzMxYjMtYTg1Zi00ODIzLTkzYTUtOTA1NWQxYjpjR0VGRkxqWXVVQ3RtZXJYbGhUZkFkYVBwWVZuWERKWm1n`\
Thus, the header should look like this:\
**Authorization: Basic**\
`Nzc3YzMxYjMtYTg1Zi00ODIzLTkzYTUtOTA1NWQxYjpjR0VGRkxqWXVVQ3RtZXJYbGhUZkFkYVBwWVZuWERKWm1n`

## Setting up Basic Auth in Postman <a href="#setting-up-basic-auth-in-postman" id="setting-up-basic-auth-in-postman"></a>

To set up Basic Auth in Postman, follow the steps below. Additionally, you can create a new collection by downloading our OpenAPI specification file available [here](broken://spaces/r0Pu7uTgoiNOnK8BvNFW/pages/9ea2bc013bb62eb731b5272a1363939bc18a6de6).

1. Navigate to the GET Health check menu item on the Collections page.
2. Click the Authorization menu item below the request URL field.
3. Choose the Basic Auth option from the Type dropdown list.
4. To send the request, paste your "user-uid" into the username field and "api key" into the password. See the screenshot below.

<figure><img src="https://3085512782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyw34t0Oefjx0nEVMOjo2%2Fuploads%2FAGshghNsEsv1TthoWBOg%2Fobtaining_api_keys_basic_auth_postman_0.png?alt=media&amp;token=b8f4e2d2-4fe0-4534-a6d3-adaa68161a7e" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.verifone.com/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer/basicauth.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
