> 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/de/features/settings/gestion-des-cles-dapi.md).

# API-Schlüssel verwalten

Diese Seite erklärt, wie Sie API-Schlüssel in Dastra erstellen

### Wozu dienen API-Schlüssel?

* **Einen API-Client erstellen** für Dastra, um Daten außerhalb der Anwendung abzurufen oder zu ändern. Dieser Client kann Server-zu-Server (Client Credential) oder JavaScript (Authorization Code) sein. Weitere Informationen finden Sie in der [Dokumentation zur Authentifizierung der Dastra-API](/de/api-references/authentification.md).
* **Ein Widget zur Rechteausübung konfigurieren** (nur öffentlicher Schlüssel). [Lesen Sie die Dokumentation zur Einrichtung des Rechteausübungs-Widgets](/de/features/gerer-les-exercices-des-droits/implementez-un-widget-dexercice-des-droits.md)
* **Ein Cookie-Consent-Widget konfigurieren** (nur öffentlicher Schlüssel). [Lesen Sie die Dokumentation zur Einrichtung der Cookie-Einwilligung](/de/features/gerer-le-consentement-aux-cookies.md)

### Wie generiere ich einen API-Schlüssel?

1. [Greifen Sie auf den Manager](https://app.dastra.eu/general-settings/api) der Dastra-Schlüssel zu (Nur Kontoinhaber haben Zugang zu diesem Bereich)
2. Klicken Sie auf „**API-Schlüssel erstellen**"
3. Geben Sie den Namen des Schlüssels und die Umleitungs- und CORS-URLs ein (wenn Sie die API in JavaScript mit OAuth2 verwenden möchten)
4. Klicken Sie auf „**Speichern**"
5. Sobald Ihr API-Schlüssel erstellt ist, können Sie ihn direkt aus dem Manager kopieren und einfügen (privater oder öffentlicher Schlüssel)

{% hint style="warning" %}
**Bewahren Sie Ihre API-Schlüssel sorgfältig auf! Der private Schlüssel darf unter keinen Umständen öffentlich verbreitet werden!**

**Wenn die Sicherheit Ihres API-Schlüssels kompromittiert ist**, können Sie ihn aus dem Manager löschen und einen neuen generieren
{% 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/de/features/settings/gestion-des-cles-dapi.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.
