Back
AuthorizedAuthorizedDocs
POST

Heartbeat

Updates the last activity timestamp for a session. Call this every few minutes to keep the session alive.

POST/api/v1/heartbeat

Request Body

api_keyrequired
string
Your application API key
session_tokenrequired
string
Active session token

Python — Background Thread

python
import time, threading, requests

def heartbeat_loop(api_key, session_token):
    while True:
        try:
            requests.post("https://authorized.lol/api/v1/heartbeat", json={
                "api_key": api_key,
                "session_token": session_token
            })
        except: pass
        time.sleep(300)  # every 5 minutes

threading.Thread(target=heartbeat_loop, args=(api_key, session), daemon=True).start()