{% extends "config/base.html" %} {% import "site_shell/_macros.html" as ui %} {% block title %}API Tokens - Pychestrate{% endblock %} {% block content %} {% set form = form_data or {} %} {% include "config/tokens/_minted.html" %}

Create a token

{{ ui.error_summary(errors, error_labels) }}
{{ ui.field_error(errors, "name") }}

What the token is for, so you can recognise it later.

{% set chosen_days = (form.get('expires_in_days') or default_lifetime_days) | string %} {{ ui.field_error(errors, "expires_in_days") }}
{{ ui.field_error(errors, "scope") }}
{% for token in tokens %} {% else %} {{ ui.empty_state("You have no API tokens", hint="Create one above to use the pyc command line.", colspan=8) }} {% endfor %}
Your API tokens
Name Token Access Status Created Last used Expires Actions
{{ token.name }} {{ token.token_hint }}… {{ token.scope }} {{ ui.status_badge(token.status) }} {{ token.created_at | format_datetime }} {% if token.last_used_at %}{{ token.last_used_at | format_datetime }}{% else %}never{% endif %} {{ token.expires_at | format_datetime }} {% if token.status == 'active' %}
{% else %} — {% endif %}
{% if can_view_admin_tokens %}

Administrators: service accounts and everyone's tokens are on Admin › API Tokens.

{% endif %} {% endblock %}