{% extends "base.html" %} {% load i18n static wger_extras %} {% block title %}{% translate "API key" %}{% endblock %} {% block content %}

Please use JWT authentication if possible. More details in the online documentation.

{% translate "Your API key" %}
{% if token %} {{ token.key }} {% else %} {% translate "You have no API key yet" %} {% endif %}

Pass "Token {% if token %}{{ token.key }}{% else %}1234567890abcde...{% endif %}" in the Authorization header to use it

Example with curl:

curl -X GET https://wger.de/api/v2/routine/ \
     -H 'Authorization: Token {% if token %}{{ token.key }}{% else %}1234567890abcde...{% endif %}'
{% endblock %} {% block sidebar %}

{% translate "Options" %}

{% if token %} {% translate 'Delete current API key and generate new one' %} {% else %} {% translate 'Generate new API key' %} {% endif %}

{% translate 'Documentation' %}

{% endblock %}