02-25-2023 08:11 - edited 02-25-2023 15:50
02-25-2023 08:11 - edited 02-25-2023 15:50
Can fitbit Web API provide source device information for any data? For example, when I will fetch daily activity summary, is it possible to know from which device these data are collected from (e.g., pixel watch, fitbit charge 5).
I have gone through the web api documentation of fitbit. I haven't seen any information for source information. The device endpoint only give us a list of device that is connected with the profile. So my assumption is that fitbit does not provide the source data.
[Update:] I have found that `get weight log` and `get body fat log` both API call provide source field (e.g., API, Aria, Withings). But I cannot find source field from other API.
Answered! Go to the Best Answer.
03-06-2023 11:34
03-06-2023 11:34
Hi @diptopol
The Web API is not designed to return specifically which Fitbit device provided the data. There are some ways to can try to determine the source, but these would not be exact.
1. If the user consents to the "settings" scope, you can query the Get Devices endpoint to see which devices are paired to the account and use the last sync time to estimate which device the user is wearing.
2. Some of the endpoints will return the generalize the source of the data. For example, the Get Activity Log List's logType response element can return the source of the recorded exercise as being either auto_detected, manual, mobile_run, tracker, or the name of the 3rd party application. The Sleep log's logType response element can tell you if the source of the data is auto_detected or manually entered. The Body endpoint's source element can tell you if the data came from the API, Aria, AriaAir, or Withings
Gordon
03-04-2023 21:32 - edited 03-04-2023 21:42
03-04-2023 21:32 - edited 03-04-2023 21:42
Hi @diptopol - it would seem unlikely to get the source device for non shared data input.
Even so, requesting a full data export from the web profile might show something, but never noticed the device being quoted, though wasn't looking.
It can take quite a while to retrieve the full history.
Login, on the web browser, click the gear icon top right, select the device, under data export, Export Your Account Archive, request data.
Author | ch, passion for improvement.
03-06-2023 11:34
03-06-2023 11:34
Hi @diptopol
The Web API is not designed to return specifically which Fitbit device provided the data. There are some ways to can try to determine the source, but these would not be exact.
1. If the user consents to the "settings" scope, you can query the Get Devices endpoint to see which devices are paired to the account and use the last sync time to estimate which device the user is wearing.
2. Some of the endpoints will return the generalize the source of the data. For example, the Get Activity Log List's logType response element can return the source of the recorded exercise as being either auto_detected, manual, mobile_run, tracker, or the name of the 3rd party application. The Sleep log's logType response element can tell you if the source of the data is auto_detected or manually entered. The Body endpoint's source element can tell you if the data came from the API, Aria, AriaAir, or Withings
Gordon
03-11-2023 23:09
03-11-2023 23:09
Thank you for your reply. It makes sense. I just wanted to verify my understanding.