django-garmin demo

{% if messages %} {% endif %} {% if connection and connection.status == 'active' %}
Garmin connected
Garmin user ID: {{ connection.garmin_user_id }}
Status: {{ connection.status }} · Token: {% if connection.is_token_expired %}expired{% else %}valid{% endif %} (expires {{ connection.token_expires_at }}) · Last sync: {{ connection.last_sync_at|default:"never" }}
{% csrf_token %}
Garmin's pull endpoints filter by upload time — a sync window covers whatever your devices synced to Garmin Connect during it, not the days the data was recorded. Sync your watch in the Garmin Connect app first, then sync here.
{% if connection.is_token_expired %}
Access token expired.
A sync will try to refresh it; if the refresh token is also expired (Garmin refresh tokens last ~90 days), re-authorize to mint a new one.
Re-authorize
{% endif %}
{{ record_count }} record(s) · {{ workout_count }} workout(s) in healthdatamodel
Browse records
Re-authorize
{% csrf_token %}
{% else %}
{% if connection %} Garmin {{ connection.status }}.
This connection can no longer sync. Re-authorize to resume. {% else %} Not connected to Garmin.
You'll be sent to Garmin Connect for consent, then back here. {% endif %}
{% if connection %}Re-authorize{% else %}Connect Garmin{% endif %}
{% endif %}