{% load i18n %}

{% trans 'API tokens' %}

{% blocktrans %}A token lets a program or an AI assistant use this site with your account, through the REST API (sdc_api/) or MCP. It can only do what its privileges allow, and never more than you can do yourself. Revoke a token as soon as you no longer need it.{% endblocktrans %}

{% trans 'Your new token. Copy it now: it is not shown again.' %}

{% trans 'Your tokens' %}
{% if tokens %}
{% for token in tokens %} {% endfor %}
{% trans 'Name' %} {% trans 'Token' %} {% trans 'Privileges' %} {% trans 'Created' %} {% trans 'Expires' %} {% trans 'Last used' %}
{{ token.name }}{% if token.kind == 'login' %} {% trans 'login' %}{% endif %} {{ token.prefix }}… {{ token.privileges|join:", " }} {{ token.created_at|date:"SHORT_DATETIME_FORMAT" }} {% if token.expires_at %}{{ token.expires_at|date:"SHORT_DATETIME_FORMAT" }}{% else %}{% trans 'never' %}{% endif %} {% if token.last_used_at %}{{ token.last_used_at|date:"SHORT_DATETIME_FORMAT" }}{% else %}{% trans 'never' %}{% endif %} {% if token.is_revoked %}{% trans 'revoked' %} {% elif token.is_expired %}{% trans 'expired' %} {% else %} {% endif %}
{% else %}

{% trans 'You have no tokens yet.' %}

{% endif %}
{% trans 'New token' %}
{% trans 'Privileges' %}
{% for privilege in model_privileges %}{% endfor %} {% for privilege in model_privileges %} {% endfor %} {% for model in models %} {% for privilege in model_privileges %} {% endfor %} {% endfor %}
{% trans 'Data' %}{{ privilege }}
{% trans 'All data models' %}
{{ model }}

{% trans 'Account' %}