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

# Authentication

To ensure proper authentication of your API calls, make sure to include your secret key in the Authorization header of each request you send. You can manage your API keys directly from the [dashboard](https://dashboard.lahza.io).

In our integration, we provide both public and secret keys. Public keys are intended for use on the front-end when integrating with Lahza Inline and in our Mobile SDKs exclusively. Public keys have limitations and cannot modify any aspect of your account, except for initiating transactions towards your account. On the other hand, secret keys are intended to be kept confidential. If you suspect that your secret key has been compromised or if you wish to reset it for any reason, you can easily do so from the dashboard.<br>

{% hint style="danger" %}
**Secure your secret key**

Do not commit your secret keys to git, or use them in client-side code.
{% endhint %}

Authorization headers should be in the following format:

&#x20;`Authorization: Bearer SECRET_KEY`

{% hint style="info" %}
**Sample Authorization Header**\
Authorization: Bearer sk\_test\_UkqerSTELjYhf6GNe6lB
{% endhint %}

API requests made without authentication will fail with the status code&#x20;

`401: Unauthorized`. All API requests must be made over HTTPS.<br>

{% hint style="danger" %}
**Secure your requests**\
Do not set `VERIFY_PEER` to `FALSE`. Ensure your server verifies the SSL connection to Lahza.
{% endhint %}

<br>


---

# 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 dynamically by asking a question.

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

```
GET https://api-docs.lahza.io/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
