{% extends "ui/base_ui.html" %} {% block title %}My Tokens — ATP Platform{% endblock %} {% block content %}

My Tokens

{% if new_token %}
New user-level API token — copy it now
{{ new_token }}
This is the only time the full token is shown. Once you leave this page, only the prefix {{ new_token[:12] }}... will be visible. Use as Authorization: Bearer {{ new_token[:12] }}....
{% endif %} {% if error %}
{{ error }}
{% endif %} Create user-level token
Short label — shown in this list. Not part of the token value. Leave blank to use the server default (30 days). Enter 0 for no expiry, if allowed.

User-level tokens (atp_u_...) authenticate you for management APIs (create agents, invites, other tokens). For bot accounts that play tournaments, prefer agent-scoped tokens (atp_a_...) created from each agent's detail page.

Existing tokens

{% if tokens %}
{% for t in tokens %} {% endfor %}
Name Type Agent Prefix Expires Last Used Status
{{ t.name }} {{ 'agent' if t.agent_id else 'user' }} {{ t.agent_name or '—' }} {{ t.token_prefix }}... {{ t.expires_at.strftime('%Y-%m-%d') if t.expires_at else 'never' }} {{ t.last_used_at.strftime('%Y-%m-%d %H:%M') if t.last_used_at else '—' }} {% if t.revoked_at %}revoked{% elif t.expires_at and t.expires_at < now %}expired{% else %}active{% endif %}
{% else %}

No tokens yet. Use the form above to create a user-level token, or create agent-scoped tokens from each agent's detail page.

{% endif %} {% endblock %}