{% extends "baseTemplate/index.html" %} {% load static %} {% comment %} REST API token management. The plaintext token is rendered exactly once, in the response to the issuing call; every page load after that shows only a prefix. {% endcomment %} {% block title %}API access{% endblock %} {% block content %} {% comment %} The stored allowlist is handed to the controller through a data attribute so Django does the escaping; never interpolate server text into a script body. {% endcomment %}
Tokens authenticate automated callers against the CloudPanel REST API at
/api/.
Copy it now. This is the only time the full value is shown — the panel stores it but never displays it again. If you lose it, issue a new one, which invalidates this one.
{{ userName }}{{ tokenPrefix }}…
(prefix only)
{% else %}
No token issued
{% endif %}
Send it as a bearer token:
curl -H "Authorization: Bearer <token>" \
https://cp.a1hosting.net:8090/api/
Issuing a token for an account is equivalent to holding its credentials, so this is limited to accounts you own.