No description
Find a file
2026-09-26 22:03:39 +05:30
src Add cookie tutorial and configurable 12h/24h time format 2026-09-26 22:03:39 +05:30
tests Remove emojis from codebase, config, and documentation 2026-09-26 21:59:57 +05:30
.env.example Add cookie tutorial and configurable 12h/24h time format 2026-09-26 22:03:39 +05:30
.gitignore Initial commit: insta-note-clock implementation with tests 2026-09-26 20:41:21 +05:30
Cargo.toml Initial commit: insta-note-clock implementation with tests 2026-09-26 20:41:21 +05:30
config.example.toml Add cookie tutorial and configurable 12h/24h time format 2026-09-26 22:03:39 +05:30
config.toml Add cookie tutorial and configurable 12h/24h time format 2026-09-26 22:03:39 +05:30
README.md Add cookie tutorial and configurable 12h/24h time format 2026-09-26 22:03:39 +05:30

insta-note-clock

A lightweight Rust CLI daemon that updates your Instagram Note with the current time at a configurable, safe interval.

Disclaimer: Instagram has no public API for Notes. This tool interacts with private mobile endpoints, which violates Instagram's Terms of Service. Frequent updates risk rate limits (HTTP 429) or account suspension. Default interval is 120s with exponential backoff. Use at your own risk.


Quick Start

1. Build

cargo build --release

2. Authenticate

# Option A: Direct session cookie import (recommended)
cargo run -- login --session-id "YOUR_SESSION_ID" --user-id "YOUR_DS_USER_ID"

# Option B: Interactive login (supports 2FA or guided cookie entry)
cargo run -- login

Session data is saved securely to session.json with restricted 0600 permissions.

3. Run

# Test run without hitting Instagram
cargo run -- --dry-run once

# Update once and exit
cargo run -- once

# Run continuous sync loop
cargo run -- run

How to Get Your ds_user_id & sessionid Cookies

Using your browser cookies is the safest authentication method because it bypasses Instagram's mobile app bot detection algorithms.

  1. Open your web browser (Chrome, Firefox, Edge, or Brave).
  2. Go to instagram.com and log in to your account.
  3. Press F12 (or right-click anywhere and choose Inspect) to open Developer Tools.
  4. Go to the storage tab:
    • In Chrome / Edge / Brave: Click the Application tab at the top.
    • In Firefox: Click the Storage tab at the top.
  5. In the left sidebar, expand Cookies and select https://www.instagram.com.
  6. Find these two cookie names in the table:
    • ds_user_id: Your numeric user ID (e.g. 6891234567).
    • sessionid: Your private session authentication token.
  7. Copy both values and pass them to the login command:
    cargo run -- login --session-id "YOUR_SESSION_ID" --user-id "YOUR_DS_USER_ID"
    

Configuration (config.toml)

[instagram]
session_file = "./session.json"
timezone = "Asia/Kolkata"

[note]
interval_seconds = 120    # Minimum recommended: 120s

# Time display mode: choose "12h" or "24h"
#   "12h" -> 02:30 PM
#   "24h" -> 14:30
mode = "12h"

# Optional custom strftime format (leave empty to use `mode` setting)
time_format = ""

prefix = ""
suffix = ""
max_requests_per_hour = 30

Environment variables prefixed with INSTA_ (e.g. INSTA_NOTE__MODE=24h) are also supported.