</> Developers Guide to Funraisin

Fitness Apps

Funraisin supports the ability to connect to APIs from the below smartphone based fitness apps.

FitBit

Strava

Under Armour (MapMyFitness, MapMyRun,etc)

Data Structure

Fitness data is located in the following 2 areas

Members Fitness Setup

Information relating to any connected apps where "source" is the connected app e.g. fitbit, strava, etc

["id","member_id","history_id","source","source_id","webhook_id","token","token_expiry","refresh_token","auth_code","token_error","reminder_sent","reminder_sent_date","last_updated","date_created"]

Members Fitness Activity

Where the actual fitness data is stored when pulled in from the connected service.

["id","member_id","history_id","team_id","org_id","event_id","source","source_id","distance","elevation","kilojoules","calories","start_latlng","end_latlng","duration","activity","activity_type","steps","activity_data","date_from","date_created"]

Sync Schedules

All fitness apps sync via a scheduled cron which is set to run hourly, staggered at various times between sites on the same server.

All syncs are designed to look for data from the previous day to ensure that there is fitness data able to be collected. In addition to this, some services also use a Webhook which allows the service to send data to Funraisin as it is created. Currently only Strava does this.

API Credentials

All fitness services use OAUTH to allow us to connect and the credentials for each service are stored in the Funraisin Admin under Platform Setup > General > App Settings.

When signing up to each server the following settings can be used where domain.com is the domain of your Funraisin website.

Fitbit

Signup at: https://dev.fitbit.com
Application Name: Name to appear to user when connecting
Application Website: Clickable link for the above Name
Organisation: Also appears next to the application name when connecting
Organisation Website: Clickable link for the above Organisation name
Terms of Conditions: link to your terms and conditions
Privacy Policy url: link to your privacy policy
Callback URL: https://www.domain.com/login/fitbit
OAuth 2.0 Application Type: Server
Default Access Type: Read-Only

Strava

Signup at: https://www.strava.com
Website: https://www.domain.com
Application Domain: www.domain.com (no https)

Under Armour

Signup at: https://developer.underarmour.com/
Callback Url https://www.domain.com/login/mapmyfitness

FitBit

The following data is obtainable via the Fitbit service when requesting the user's past day's activities.

ID
Distance (metres)
Duration (seconds)
Activity Name
Steps
Activity Type
Date of Activity

If no activities are found then we will attempt to get the connected user's daily summary which contains the same information but is not activity specific. For this the Activity name will be "General"