1.5 KiB · text History 1ce9641
{% extends "root.html" %}

{% block inner %}
<div class="space-y-4 text-left">
  <h2 class="text-2xl font-bold text-accent">API token created</h2>
  <div class="alert alert-warning">
    <i class="fas fa-triangle-exclamation"></i>
    <span>This is the only time the full token will be shown. Store or scan it now.</span>
  </div>

  <div class="card bg-base-200 p-4 space-y-3">
    <h3 class="font-bold">Pair the Android app</h3>
    <div class="flex flex-col md:flex-row items-center gap-4">
      <div class="bg-white p-3 rounded">{{ qr_svg | safe }}</div>
      <div class="space-y-2 text-sm">
        <div><strong>Server URL</strong></div>
        <code class="text-xs block">{{ base_url }}</code>
        <div><strong>Token</strong></div>
        <code class="text-xs break-all block">{{ token.token }}</code>
        <div><strong>Pairing URI</strong></div>
        <code class="text-xs break-all block">{{ pair_uri }}</code>
      </div>
    </div>
  </div>

  <div class="card bg-base-200 p-4 text-sm space-y-2">
    <h3 class="font-bold">Scripts / curl</h3>
    <pre class="text-xs overflow-x-auto bg-base-300 p-2 rounded">curl -H "Authorization: Bearer {{ token.token }}" {{ base_url }}/api/profile</pre>
    <p class="opacity-70">
      If your DMS is behind a proxy, set <code>DMS_PUBLIC_URL</code> on the
      server so the QR points at the public origin instead of the bind
      address.
    </p>
  </div>

  <a href="/api-tokens" class="btn btn-ghost btn-sm">&larr; Back to tokens</a>
</div>
{% endblock %}