{# Rendered through ``admin.index_view.render`` so the admin navbar stays present. Theme-aware: only .app-card / bootstrap classes, no hardcoded colours, so all four themes render correctly. #} {% extends 'admin/master.html' %} {% block body %}

API Tokens

Personal access tokens for the REST API. A token authenticates as you and carries your API roles{% if current_user.restrict_to_accounts %} and account scope{% endif %}. Use it as a Bearer token: Authorization: Bearer <token>.

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %} {% if new_token %} {% endif %}

Create a token

Your tokens

{% if tokens %}
{% for token in tokens %} {% endfor %}
Label Prefix Created Last used Expires
{{ token.label }} {{ token.prefix }}… {{ token.created_at.strftime('%Y-%m-%d %H:%M') if token.created_at else '—' }} {{ token.last_used_at.strftime('%Y-%m-%d %H:%M') if token.last_used_at else 'never' }} {% if token.expires_at %} {{ token.expires_at.strftime('%Y-%m-%d') }} {% if token.is_expired() %} expired {% endif %} {% else %}never{% endif %}
{% else %}

You have no API tokens yet.

{% endif %}
{% endblock %}