Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mobile app integration base on our existing user

Hello,

 

We are developing a mobile app to add a Fitbit feature base on our existing user that already in our database as well. The feature that we are working on is reading a data such as heart rate, steps, distance, calories burn etc via Fitbit web api.

 

As I have learnt from its documentation, the user will need to register to the https://dev.fitbit.com and add an application right over there and get all credentials such as client_id, client_secret,setting callback url etc.

 

The question is :  

Is there any simpler way that we can register a user rather than doing self registration and adding an application by themselves? Because not all our user is a tech savvy that know how to setting a callback url, etc.  

 

I do appreciate if there is any other method that can be share base on our similar case.

 

 

 

Thanks

 


Sandy

 

 

 

 

 

 

Best Answer
0 Votes
3 REPLIES 3

Hi @Sanddoz 

 

Unless you want your users to own the Fitbit Web API integration, your user-base should not need to register the application to obtain the client ID, client secret, etc.   Instead, your users will need to consent to share their data with your application.   The application will need to implement the Authorization Code Grant Flow as described in our documentation.   See https://dev.fitbit.com/build/reference/web-api/developer-guide/authorization/.   Once each user has consented to share their data, your application will be able to query their data using the access token created.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

@Gordon-C wrote:

Hi @Sanddoz 

 

Unless you want your users to own the Fitbit Web API integration, your user-base should not need to register the application to obtain the client ID, client secret, etc.   Instead, your users will need to consent to share their data with your application.   The application will need to implement the Authorization Code Grant Flow as described in our documentation.   See https://dev.fitbit.com/build/reference/web-api/developer-guide/authorization/.   Once each user has consented to share their data, your application will be able to query their data using the access token created.

 

Gordon


Hi @Gordon-C ,

 

Thanks for replying my query. I am interested what you said here : 
"Unless you want your users to own the Fitbit Web API integration, your user-base should not need to register the application to obtain the client ID, client secret, etc."

 

Would that be possible to do that? if possible, how can we get there?

 

Our objective is with our existing user's email in our database (as long as they have same email like fitbit's user email), the user can be see their data such as steps, heart rate etc as long as they already registered in fitbit app (via iOS or Android) previously.

 

Maybe if there is any possibility to hit an API within email parameter, all informations like steps, heart rate etc will be retrieve from fitbit API base on the user email?    

 

 

Thanks

 

 

Sandy

 

 

 

 

 

Best Answer
0 Votes

Hi Sandy,

 

To accomplish this, you will need to implement the authorization flow based on the link provided above, https://dev.fitbit.com/build/reference/web-api/developer-guide/authorization/.  Each user will need to consent to share their data with your application.   If you already have your populations email address, then I would recommend sending them a marketing email announcing support for Fitbit integration within your application.   The users will select your authorization URL, log into their Fitbit account, enable the scopes they want to share with your application, and an access token will be generated for your application.   Your application will need to store and manage the tokens as they get updated so your application can maintain access to their user's Fitbit data.

 

I recommend you read the documentation.  If you have further questions, let me know.

 

Best,

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes