{% extends "admin/base.html" %} {% block title %}API Tokens{% endblock %} {% block content %}

API Tokens

{% if new_token %}

New token created! Copy it now — it won't be shown again.

{{ new_token }}
{% endif %}

Create Token

Active Tokens

{% if tokens | length > 0 %} {% for token in tokens %} {% endfor %}
Name Prefix Permissions Last Used Expires Created
{{ token.name }} {{ token.prefix }} {{ token.permissions }} {{ token.last_used_at | default(value="Never") }} {{ token.expires_at | default(value="Never") }} {{ token.created_at | truncate_str(len=10) }}
{% else %}

No API tokens yet. Create one to enable the REST API.

{% endif %}

API endpoints: GET /api/v1/posts, /api/v1/pages, /api/v1/tags, /api/v1/series, /api/v1/media, /api/v1/site
Usage: curl -H "Authorization: Bearer pb_..." {{ site.url }}/api/v1/posts

{% endblock %}