FitBit

FitBit

In order to setup FitBit within any Centrlapoint Portal you must:

1.) Log into https://dev.fitbit.com/login. Since Google has acquired Fitibt, you will need to use your Google Credentials.  and click on the link “Manage Your Apps”. 2.) Register a New App (found in top right of the FITBIT Dev administration page) 3.) It will ask you to enter the Application Name (which can be whatever you choose to call it), 4.) It will ask for a Description (which can be whatever description you choose to give it) 5.) Application Website URL: This will be the URL of your website, or can be a prefixed name (like https://test.oxd20.com) 6.) Organization : Here it will be asking for the actual Organization or owner of the URL (It need not be the same as the URL above in step 5) 7.) Terms of Service URL: Here it is asking for the website which outlines the terms of service or Privacy Policy from the organization (and need not be the same as in step 5) 8.) Privacy Policy URL: Here it is asking for the URL to the Privacy Policy. Often times the terms and privacy are on the same page or url, and you can use the same link for both step 7 and 8 if needed) 9.) oAUTH 2.0 Application Type: Select Server 10.) Redirect URL: Here it asking where to return the user after they have authenticated with FITBIT. THis would be same URL as found within Admin/Properties (or https://www.yourdoman.com//Modules/MyLogs/FitBit/Authorize.aspx) 11.) Default Access Type: Read Only 12.) Next you will need to agree to FITBIT's terms of service (checkbox). 12.) When completed, click on REGISTER

Once you have completed these steps, FITBIT will provide you with FITBIT generated values (needed information) for you to enter into your Admin/Properties, within your Centralpoint Client Console. They are: FITBIT CLIENT ID, FITBIT CONSUMER SECRET, and FITBIT CALLBACK URL. Please enter the ClientID and Consumer Secret ID, and for the FITBIT Callback URL, use: https://YOURDOMAIN/main/fit-bit-authorize

In the Client Console's Admin > Template Gallery, click on Sleep Log: Awakenings Count, Sleep Log: Efficiency, Sleep Log: Minutes After Wakeup, Sleep Log: Minutes Asleep, Sleep Log: Minutes Awake, and Sleep Log: Minutes To Fall Asleep. This will put records in the module My Logs > Logs.

On the front end of the client Centralpoint site, make sure that the Navigation record that points to /Modules/MyLogs/FitBit/Authorize.aspx is Private, and send Authenticated Users who have a FitBit to that page. They will then have to Authorize the web site to use their FitBit. When they Authorize, this will take some time for the web site to create a record in Members > Fitbit and also gather the data that will go into My Logs > Member Logs and My Logs > Member Logs Records.

Then if you haven't already, you can set up a Module Designer record for My Logs so that Users can view their Sleep Logs in real time.

There is also a Scheduled Task called FitBit that you will need to turn on. This will go through all of the Members > Fitbit records and if they are enabled, it will gather their data on a daily basis preferably. The Scheduled Task is in the Master > Content > Scheduled Tasks. The Job is called FitBit. You will want to set which website or all the websites that you want the FitBit Scheduled Task to run on, then choose Type Daily.