{% extends "base.html" %} {% block content %}
{% with staff_nav_active="users" %} {% include "partials/staff_sidebar.html" %} {% endwith %}
{% with breadcrumbs=[ {"name": "Staff", "href": "/staff"}, {"name": "Users", "href": "/staff/users"}, {"name": user.name | display_name(user.username), "href": "/staff/users/" ~ user.uuid}, {"name": "Security", "href": "/staff/users/" ~ user.uuid ~ "/tokens"}, {"name": "Create token"} ] %} {% include "partials/breadcrumbs.html" %} {% endwith %}

Create token

{% with staff_user_tabs_base="/staff/users/" ~ user.uuid, staff_user_tabs_active="security" %} {% include "partials/staff_user_tabs.html" %} {% endwith %} {% include "partials/flash.html" %}

API tokens let you authenticate API requests and Git smart-HTTP operations from scripts and tools. You can have up to 5 active tokens at a time. Learn more in the docs.

A label to help you recognize the token later.
Defaults to 1 month.
{% if token_limit_reached %}
This user already has 5 active API tokens. Revoke one to create another.
{% endif %}
{% with primary_label="Create token", primary_disabled=token_limit_reached, cancel_href_prefix="/staff/users/", cancel_href_value=user.uuid, cancel_href_suffix="/tokens" %} {% include "partials/form_actions.html" %} {% endwith %}
{% endblock %}