- Node.js 14+
- npm
# Install dependencies
npm installOpen motiPhysioClient.js and edit the three constants at the top:
const BASE_URL = "https://api.motiphysio.com";
const PROGRAM_ID = "YOUR_PROGRAM_ID";
const SECURITY_KEY = "YOUR_SECURITY_KEY";node motiPhysioClient.js
# or
npm startjavascript/
├── motiPhysioClient.js # All 8 endpoints, async/await pattern
├── package.json
└── README.md
- Uses
axiosfor HTTP requests (supports timeout, error handling out of the box). - All functions are
async— wrap calls in atry/catchblock in production code. - A 200 ms
sleep()is added between requests to stay within the 10 req/s rate limit. - Business-logic errors (
"error"key in response body) are thrown asErrorobjects.