Forum Posts

Resolved! Unable to log food - keep getting "Date is required"

I've authenticated fine, retrieved my token and am able to query data without problem.  However, when attempting to POST data, I keep getting the error message:{"errors":[{"errorType":"validation","fieldName":"date","message":"Date is required"}]} Th...

Resolved! Python OAuth Consent Issues - Bypass?

I've been trying to build a python script that will connect to my own fitbit account and extract information. I set up an app, have tried fitbit and python-fitbit, and even took a few stabs at urllib and python-requests... but it seems that Im always...

Resolved! Sleep goal dataset

Hi Folks, While accessing the following link, I'm getting the data that is not mentioned/described anywhere, including official API documentation: {0}/{1}/user/-/sleep/goal.jsonconsistency.awakeRestlessPercentageconsistency.flowIdconsistency.recommen...

Resolved! Accessing Fitbit Benchmark data

Hi Folks, Any ideas on how to get benchmarks for particular age/gender? Say, for sleep phases. I am able to see those via mobile app, however, no same data online/via api Cheers

Heart rate with python api

Hi,I am developing a python application for my university and I need to access heart rate during an activity (avg data or something that tell me how user is performing during a run). I am using this api https://github.com/orcasgit/python-fitbit .I ha...

getting the sleep stages with the web API

In the web api documentation, under sleep logs: https://dev.fitbit.com/build/reference/web-api/sleep/It says that you can get one of these two responses:- stages: Levels data is returned with 30-second granularity. 'Sleep Stages' levels include deep,...

shachar by Base Runner
  • 2873 Views
  • 18 replies
  • 0 votes

400 bad request when I POST method with python

I just started to develop with Fitbit devices.I want to post Alarm to my devices ,so I wrote a code.Here is the codeimport json import requests headers = { "Authorization": "Bearer secret", "content-type": "application/json" } payload={"time":"09:...

takepan by Jogger
  • 2819 Views
  • 4 replies
  • 0 votes

Web API Development

Hi ,I would like to know what are the steps required to brainstorm, for building a Web API? What should be the process for one consider before diving into it. For example, to build a web api one needs to plan the following in sequence (not sure if it...

How to get OAuth access/refresh tokens with Python?

My program opens a page using the request urls in which the user logs into. They then authorize us to use their data, and then are redirected to the callback uri (the localhost) + a code. I am able to parse this code at the end of the callback out, b...

Downloading all time series data?

I was wondering if there is a way to download time series data of all types of activities (heart rate, calories, steps, etc) without directly specifying each activity in code? So far, I have to hardcode a list of the names of activities that I got fr...

Intraday Sleep Data

I require a patient's minute-by-minute sleep data for my research.Is it possible to gather it using the web API.The only options I can see are some kind of summary.

M_Nara by Jogger
  • 822 Views
  • 1 replies
  • 0 votes

Unexpected Response Data When Getting Steps With API

I having difficulties getting steps data when sending a GET request to a URL with the following format:"https://api.fitbit.com/1/user/-/activities/tracker/steps/date/" + basedate + "/"+enddate+".json" When "basedate" is "today" and "enddate" is befor...

Sleep integration with home automation

Hi,Trying to figure out how I can verify my own state of sleep (Sleeping/Awake) to be able to automate setting the lights in our house. I want the lights to go off when I fall asleep I'm able to get sleep time data but it seems I have to open the app...

stenjo by Jogger
  • 1318 Views
  • 1 replies
  • 0 votes

problem getting the HR data through the python API

hey there, i'm trying to export all the sleep and HR raw data through the python fitbit API (https://github.com/orcasgit/python-fitbit).i've registered my app as "personal use", so the HR data should be avialable, but when i'm trying to get it (runin...

shachar by Base Runner
  • 1074 Views
  • 1 replies
  • 0 votes

querying a range of dates with python-fitbit

I'm trying to write what I'd think should be a simple python program to query my historical step totals for each day, but am running into the 150 queries/hour limitation.  With 1000+ days of data, it's a bit painful doing 4 months, sleeping an hour, ...

Resolved! Getting an error which i am unaware

I am trying to  get an access token from refresh token.I got this error   send: b"POST /oauth2/token HTTP/1.1\r\n Host:https://api.fitbit.com User-Agent: python-requests/2.18.4\r\n Accept-Encoding: g zip, deflate\r\n Accept: */*\r\n Connection: keep-...

access24 by Recovery Runner
  • 775 Views
  • 1 replies
  • 0 votes

Resolved! why my app is not showing in fitbit users applications

I created an app in Fitbit later I wrote code for authentication import pythonfitbitfrom pythonfitbit import gather_keys_oauth2 as Oauth2 import pandas as pd import datetime CLIENT_ID = '******'CLIENT_SECRET = '***************************'server = O...

access24 by Recovery Runner
  • 812 Views
  • 2 replies
  • 0 votes

Posting activity with distance of zero

I am trying to post an activity to "api.fitbit.com/1/user/id/activities.json" where "distance" is "0.0". However, the API returns this error:Invalid distance: 0.0Is there a way to prevent that from failing? There is no documentation that I found that...

bwalks by Jogger
  • 709 Views
  • 1 replies
  • 0 votes

Real-Time Heart Rate Streaming

Hi All, I've successfully managed to query heart rate data using the python-fitbit library, but noticed there is a sync delay of approximately 10-15 minutes between pushes from the phone to the fitbit servers. I'm hoping to use the Alta HR as a conti...

jf52 by Jogger
  • 2526 Views
  • 3 replies
  • 0 votes