> 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

### 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 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://doc.dastra.eu/de/features/settings/gestion-des-cles-dapi.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.
