This method allows reading the heart rate of the user in real-time. The WebSocket connection can be interrupted at any point in time, make sure to have retry logic with backoff.
Request
name
value
url
wss://dev.pulsoid.net/api/v1/data/real_time
scope
data:heart_rate:read
Authentication
Provide your OAuth2 Bearer token using one of the following methods:
Websocket URL Request Example With response_mode=text_plain_only_heart_rate
WebSocket Message Example With response_mode=text_plain_only_heart_rate
JavaScript / TypeScript
For JavaScript and TypeScript applications, use the official @pulsoid/socket library instead of managing WebSocket connections manually. It provides auto-reconnection with exponential backoff, typed events, and zero dependencies.
See the GitHub repository for full documentation and configuration options.