02-10-2015 02:18 - edited 02-10-2015 02:19
02-10-2015 02:18 - edited 02-10-2015 02:19
1.Right now I've an android apps related to health care and I've created an user interface for allowing fitbit user to share their data with my apps. when they are allowing me by pressing allow button is it true? by allowing on the user automatically added as a subscriber in my application(which is created in https://dev.fitbit.com/apps ).If yes then my question is how can I differentiat or identify user?
2.When an user subscribed to my application(Fitbit application) and my callback url notify for the user is it? If yes then which data belongs to notify my callback url?.
3.Is there any limitation about subscriber? If yes then how many subscribe I've added in one application?
Note: my calback url is a wcf web service
Thanks in Advanced!
Answered! Go to the Best Answer.
02-12-2015 10:57
02-12-2015 10:57
Everytime user clicks "Allow" button Fitbit will be issuing the request to the callback url that you specify in you app settings.
Once you get the request and exchange your temp token with permanent token you can just create subscription in your code by using https://wiki.fitbit.com/display/API/Fitbit+Subscriptions+API#FitbitSubscriptionsAPI-Addasubscription
endpoint.
Everytime Fitbit will send you push notifications it will be sending user id with it so it should be easy for you to detect what user this push notifications belongs to.
02-11-2015 08:48
02-11-2015 08:48
Subscription is never created automatically. You need
1) Create subscriber in your application's settings.
2) Susbcribe user to this subscriber.
Each subscriber has it's own endpoint url that Fitbit will fetch if subscriber is subscribed to listen to the entity that was updated.
02-12-2015 00:24
02-12-2015 00:24
"Subscription is never created automatically"
:(. If an uesr allow to share their data then it's create automatically subscription in my application(fitbit apps) is not it? If is not it then it is tough to me or is it not possible to set subcription by manually!!! because I've lots of user
02-12-2015 10:57
02-12-2015 10:57
Everytime user clicks "Allow" button Fitbit will be issuing the request to the callback url that you specify in you app settings.
Once you get the request and exchange your temp token with permanent token you can just create subscription in your code by using https://wiki.fitbit.com/display/API/Fitbit+Subscriptions+API#FitbitSubscriptionsAPI-Addasubscription
endpoint.
Everytime Fitbit will send you push notifications it will be sending user id with it so it should be easy for you to detect what user this push notifications belongs to.
02-12-2015 21:04 - edited 02-12-2015 21:10
02-12-2015 21:04 - edited 02-12-2015 21:10
Now I'm clear.
Thank you very much
01-02-2018 10:39
01-02-2018 10:39
Hi,
I have a similar issue. I also made a unity application and I am trying to use fitbit data with it.
I found this unity project, https://github.com/TravisEvashkevich/UnityFitbit which is amazingly helpful. After I ran the project thought, as expected it took me to the authorisation page, and after I clicked allow it took me to my callback url. Therefore, I don't know how to get the value of my new returnCode/code which then remains null, so I can't use any getData functions.
Any idea what I am doing wrong?
Forgive me if my question seems foolish, I just literally started trying to work out how extracting data from fitbit works and I am stuck here the last couple of days, so I thought I should ask. xD
01-02-2018 11:08
01-02-2018 11:08
worked it out, never mind xD