django-oura demo

{% if messages %} {% endif %} {% if sandbox %}
Sandbox mode (OURA_SANDBOX=1)
Syncing Oura's generated fake data from /v2/sandbox/usercollection — no ring, account, or OAuth needed. A placeholder connection is created on first sync.
{% csrf_token %}
{% endif %} {% if connection and connection.status == 'active' %}
Oura connected
Oura user ID: {{ connection.oura_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 %}
Sleep (and readiness) data only reaches Oura's cloud when you open the Oura app and it syncs your ring — do that first, then sync here. Daily activity and heart rate sync in the background.
{% if connection.is_token_expired %}
Access token expired.
A sync will try to refresh it; Oura refresh tokens are single-use and rotate on every refresh, so if the stored one was already spent elsewhere, re-authorize to mint a new pair.
Re-authorize
{% endif %}
{{ record_count }} record(s) · {{ workout_count }} workout(s) in healthdatamodel
Browse records
Re-authorize
{% csrf_token %}
{% else %}
{% if connection %} Oura {{ connection.status }}.
This connection can no longer sync. Re-authorize to resume. {% else %} Not connected to Oura.
You'll be sent to Oura for consent, then back here. {% endif %}
{% if connection %}Re-authorize{% else %}Connect Oura{% endif %}
{% endif %}