2024-04-07 12:02:47 -04:00
<p class="py-6">
<p class='py-2'>Use this API key to authenticate your requests.</p>
<code><%= current_user.api_key %></code>
<p class='py-2'>
2024-05-25 08:44:32 -04:00
<p>Docs: <%= link_to "API documentation", '/api-docs', class: 'underline hover:no-underline' %></p>
2025-05-02 14:05:12 -04:00
<h3 class='text-xl font-bold mt-4'>Usage examples</h3>
2024-05-25 07:57:50 -04:00
2025-05-02 14:05:12 -04:00
<h3 class='text-lg font-bold mt-4'>OwnTracks</h3>
<p><code><%= api_v1_owntracks_points_url(api_key: current_user.api_key) %></code></p>
2024-05-25 07:57:50 -04:00
2025-05-02 14:05:12 -04:00
<h3 class='text-lg font-bold mt-4'>Overland</h3>
<p><code><%= api_v1_overland_batches_url(api_key: current_user.api_key) %></code></p>
2024-04-07 12:02:47 -04:00
</p>
<p class='py-2'>
2025-05-02 14:05:12 -04:00
<%= link_to "Generate new API key", generate_api_key_path, data: { confirm: "Are you sure? This will invalidate the current API key.", turbo_confirm: "Are you sure?", turbo_method: :post }, class: 'btn btn-primary' %>
2024-04-07 12:02:47 -04:00
</p>
</p>