# Authentication

The ZAPI requires authentication credentials to be provided with every HTTP request. Applications can authenticate with the API using basic HTTP authentication over SSL. To obtain the required credentials, please visit the '[settings](https://app.zappost.com/management/accountsettings)' page in the ZAP APP under 'API Consumers'.&#x20;

To authenticate, use basic HTTP authorization, where the API key of the application is the API Key and the API password is the API password in the UI. Some HTTP clients allow for basic authentication by including the key:password in the URL hostname. For example:

POST 45634643FGDFGFDG:hfcdethuzzjhg54@'<https://api.zappost.com/>'

If your HTTP client does not support basic authentication using this method, you can provide the credentials in the Authorization header field. To do so, join the API key and API password with a single colon (:). Then, encode the resulting string in base64 representation and prepend the base64-encoded string with "Basic" and a space. The resulting string should be included in the Authorization header field, as shown below:

Authorization: Basic NDQ3OGViN2FjMTM4YTEzNjg1MmJhYmQ4NjE5NTZ...=

{% hint style="danger" %}
It's important to keep the authentication credentials secure and not share them with unauthorized users. Make sure to store the credentials securely and not hardcode them in your application code or config files.
{% endhint %}


---

# 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://userguide.zappost.com/zap-api/authentication.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.
