{% extends 'uhepp_vault/base.html' %} {% load pygmentify_tags %} {% load crispy_forms_tags %} {% block title %}API tokens - uhepp hub{% endblock %} {% block content %}

API access tokens

{% if token %}

Your brand new token is: {{ token.key }}

Keep the token secure and don't share it with anyone.

In order to use the token to access the API, add the following code to your environment.

{% pygmentify %}
export UHEPP_API={{ request.scheme }}://{{ request.get_host }}{% url 'api-root' %}
export UHEPP_TOKEN={{ token.key }}
{% endpygmentify %} {% else %}
{% csrf_token %} {{ form|crispy }}
{% endif %} {% endblock %}