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

server apps and user interaction

ANSWERED

i am very new to fit bit web api development so i  apologize for the 

 

I am a little confused on when user interaction with my app is required 

when a server/subscription based app receives a fitbit notification that data is available, can the app reach out immediately to request the new information or does each request for data require my app to interact with the fitbit owner 

Best Answer
1 BEST ANSWER

Accepted Solutions

@nlfield,

the first interaction will be having the Fitbit user provide consent for your application to access their data.  This is accomplished through OAuth 2 using the Authentication APIs.   Once the user selects the scopes and consents to access, you should have access to their data by implementing the various endpoints.

 

For best practices we recommend implementing the Subscription API.  The subscription API will notify your application when a user has new data in their Fitbit account to share so you don't have to keep polling the APIs looking for new data..  You will receive a webhook notification that provides the Fitbit user id and new data (Activity, Body/Weight, Sleep and Food) available.  Afterwards, your application can execute the necessary API calls to get the new data for that specific user.  

 

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

@nlfield,

the first interaction will be having the Fitbit user provide consent for your application to access their data.  This is accomplished through OAuth 2 using the Authentication APIs.   Once the user selects the scopes and consents to access, you should have access to their data by implementing the various endpoints.

 

For best practices we recommend implementing the Subscription API.  The subscription API will notify your application when a user has new data in their Fitbit account to share so you don't have to keep polling the APIs looking for new data..  You will receive a webhook notification that provides the Fitbit user id and new data (Activity, Body/Weight, Sleep and Food) available.  Afterwards, your application can execute the necessary API calls to get the new data for that specific user.  

 

 

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

Thanks alot i really appreciate you taking the time to reply 

Best Answer
0 Votes