Build powerful fitness integrations with the FitLife Pro API. Access workout data, nutrition tracking, user progress, and more.
# Install the SDK
npm install @fitlifepro/sdk
# Initialize with your API key
const FitLife = require('@fitlifepro/sdk');
const client = new FitLife({
apiKey: 'flp_live_xxxxxxxxxxxx'
});
// Fetch user profile
const profile = await client.users.getProfile({
userId: 'usr_12345'
});
console.log(profile.name); // "Alex Chen"
console.log(profile.plan); // "pro"
Generate API keys from your dashboard. Keys are prefixed with flp_live_ for production and flp_test_ for sandbox.
For third-party integrations, use our OAuth 2.0 flow. Request the offline_access scope for refresh tokens.
https://api.fitlifepro.com/oauth/authorize
?client_id=YOUR_CLIENT_ID
&redirect_uri=YOUR_URI
&scope=read write
&response_type=code
Returns the profile information for a specific user.
| Parameter | Type | Description |
|---|---|---|
| userId required | string | The unique user identifier |
| include | string | Comma-separated: workouts, nutrition, progress |
{
"id": "usr_12345",
"name": "Alex Chen",
"email": "alex@example.com",
"plan": "pro",
"createdAt": "2024-03-15T10:30:00Z"
}
Log a new workout session for the authenticated user.
| Parameter | Type | Description |
|---|---|---|
| type required | string | strength, cardio, hiit, flexibility |
| duration required | integer | Duration in minutes |
| exercises | array | Array of exercise objects |
Retrieve nutrition logs for the user within a date range.
| Parameter | Type | Description |
|---|---|---|
| startDate required | date | ISO 8601 date format |
| endDate required | date | ISO 8601 date format |
Add or update a weight measurement in the user's progress history.
| Parameter | Type | Description |
|---|---|---|
| value required | float | Weight in kilograms |
| date required | date | Measurement date |
Permanently delete a workout log. This action cannot be undone.
| Parameter | Type | Description |
|---|---|---|
| workoutId required | string | The workout identifier to delete |
npm install @fitlifepro/sdk
pip install fitlifepro
com.fitlifepro:sdk
FitLifeProSDK