{% extends "madga/studio/base.html" %} {% load i18n madga_studio_tags %} {% block breadcrumbs %}{% trans "Workspace" %}/{% trans "API keys" %}{% endblock %} {% block content %}

{% trans "Your API keys" %}

{% trans "Personal tokens for the headless API. Each key is bound to your user — revoking it doesn't affect others. Bearer auth: " %}Authorization: Bearer madga_…

{% if new_key %}

{% trans "New key" %}: {{ new_key_label }}

{% trans "Copy this now — for security, we won't show it again." %}

{{ new_key }}
{% endif %}

{% trans "Create a new key" %}

{% csrf_token %}
{% for k in keys %} {% empty %} {% endfor %}
{% trans "Label" %} {% trans "Key" %} {% trans "Last used" %} {% trans "Status" %}
{{ k.label }} {{ k.display_key }} {% if k.last_used_at %}{{ k.last_used_at|timesince }} {% trans "ago" %}{% else %}—{% endif %} {% if k.is_active %}{% studio_badge "published" _("Active") %}{% else %}{% studio_badge "archived" _("Revoked") %}{% endif %}
{% if k.is_active %}
{% csrf_token %}
{% csrf_token %}
{% endif %}
{% csrf_token %}
{% studio_empty title=_("No API keys yet") message=_("Generate one above to authenticate apps against the headless API.") %}
{% endblock %}