> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/en/features/settings/api-key-management.md).

# API key management

### What are API keys used for?

* **Create a Dastra API client** to retrieve or modify data outside the application. This client can be server-to-server (Client credential) or javascript (Authorization code). To find out more, please [read the Dastra API authentication documentation](/en/features/gerer-les-exercices-des-droits/api-integration.md).
* **Configure a data subject right request form** (public key only). Read the[ documentation about DSR forms](/en/features/gerer-les-exercices-des-droits/implementez-un-widget-dexercice-des-droits.md).
* **Configure a cookie widget** (public key only). Read the [documentation related to cookies](/en/features/gerer-le-consentement-aux-cookies/configuration-du-widget/implementez-un-widget-de-consentement-aux-cookies.md).

### How generate an API key?

1. Access the [Dastra Key Manager](https://app.dastra.eu/general-settings/api) (Only tenant owners have access to this section)
2. Click on Create a new API Key
3. Enter the name of the key and the redirection and cors urls (if you want to use the javascript API in OAuth2)
4. Click on "save".
5. Once you have created your API key, you can copy and paste it directly from the manager (private or public key).

{% hint style="warning" %}
**Keep your API keys safe! The private key must never be made public!**

**If the security of your API key is compromised**, you can delete it from the manager and/or generate a new one.
{% endhint %}


---

# 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://doc.dastra.eu/en/features/settings/api-key-management.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.
