Email Us

Fitbit Integration

Use Point SDK to allow your users to integrate their Point and Fitbit accounts.


When you integrate your app with Fitbit, Point Health Service will subscribe to Fitbit to collect the end-user data and generate metrics. However, we must provide a way for the user to authenticate their account and give Point authorization to subscribe to Fitbit data.

This article will cover all steps necessary to provide full Fitbit integration to your Point-powered application.

  1. Integrate your app with Fitbit.

  2. Create a custom URL for your app in Xcode.

  3. Set up the SDK with your Fitbit Client ID.

  4. Call the Fitbit authentication method.

💡 As this integration is mostly done in Point's backend, it is available regardless of device type.

Fitbit Integration

The first step to using Fitbit within Point SDK is integrating your app with Fitbit. We have a step-by-step tutorial here.

⚠️ You also must have a user token set to handle your user's Fitbit authentication. Check Getting Started for more information.


Each user will need to individually authenticate their Fitbit account within Point SDK and give Point permission to get their Fitbit data. This is done on a Fitbit's web page, although the SDK is capable of loading a browser session that displays the authentication page. After some simple project setup, all you will need to do is call an SDK method when you wish to trigger the authentication flow.

Create a custom URL

As the authentication is handled by a browser session, the browser must know how to handle the control back to your app. For this, we can use a custom URL scheme that, when called by the browser, redirects to your app and dismisses the browser.

  1. Go to your project settings on xcode and select your app target.
  2. Under the Info tab, look for URL Types and click "+" to add a new one.
  3. In the Identifier field, enter your app's Bundle ID.
  4. In the URL Schemes field, enter the scheme you used in the callbackURL when creating your app integration with Fitbit. For example, if your callbackURL is "https://exampleApp/auth", use "exampleApp". Custom URL.

For more information, check the official docs: Defining a Custom URL Scheme for Your App


To display the authentication web page, call authenticate({callbackURLScheme: fitbitScopes:}).

When you call this function your app will display a browser with the Fitbit authentication web page. If the user successfully authenticates, the browser will be dismissed and the control will be handled back to your app.

💡 The callbackUrlScheme parameter is the scheme created in the previous section.

async authenticateFitbit() {
    await PointSDK.authenticateFitbit({ callbackURLScheme: "exampleapp" });

If you wish to select specific Fitbit scopes, use the scopes parameter. All scopes are selected by default. Check Fitbit Official Documentation to know more about scopes.

async authenticateFitbit() {
    await PointSDK.authenticateFitbit({
        callbackURLScheme: "exampleapp",
        fitbitScopes: [FitbitScopes.Activity, FitbitScopes.Heartrate],

💡 The user will be requested to provide authorization for each scope subscription, so data will be collected only if the user provides authorization.

After successful authentication, Point will retroactively retrieve one year of Fitbit data. After this, the subscriptions are created and Point will be notified for each new user data. No further action is necessary for the SDK. Check Health Data Service to know how to have access to Point's generated metrics.


You can revoke all Fitbit subscriptions of the user by calling revokeFitbitAuthentication().

async revokeFitbit() {
    await PointSDK.revokeFitbitAuthentication();

After calling this, Point Health Service will stop receiving new data from Fitbit.

Check User Status

You can use isFitbitAuthenticated() to know what is the current authentication status for your user. If the return is true your user has already authenticated and Point is collecting their data.

async authenticateFitbitIfNecessary() {
if (await PointSDK.isFitbitAuthenticated()) {
    console.log("User is already authenticated")
} else {
    await PointSDK.authenticateFitbit({ callbackURLScheme: "exampleapp" });

Next Steps

Learn more about the Oura integration.

Connect with Us

Terms & Conditions | Privacy Policy © 2023 Point® (Key Point Technologies, Inc.)