-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"login fail" error message #20
Comments
You are not alone squirrelB - would anyone please answer? |
I'm trying to figure if there's something up with the "login" code. Tried changing rememberme to TRUE but didn't help. Will play around with the POST() code. I've used R mainly for statistical applications and httr is really new to me... so if anyone can figure it out, it'll be much appreciated! |
It looks like upon fitbit's latest release they have changed some of their API structure (bit of a beginner here as well), and the login function no longer finds the relevant cookie (the one in the function that has the header "u" which no longer exists, at least from what I can see - I had 3 cookies with names "__cfduid", "JSESSION" and "fct"). I have tried the 3 cookies it returns in the existing fitbitscraper functions but they all fail. |
Yeah. Same here. Got 3 cookies; tried them individually (assigned them to "cookie <- "yadidiaaycookiehere")... seemed like I could login. But the the subsequent Fitscraper function (like "get_daily_data" for instance) resulted in an error: Will try sign up to dev.fitbit.com and try httr; but heard that was complicated setting up the token and stuff. |
Hi Both, When I ran the following httr::POST(url, I got Response [https://www.fitbit.com/login] It's a 403 error message indicating login failure. Did you get the same message? |
Yea I get the same response, status 403, anyone had any luck? |
Yeah, session 403. From what I've read "403 Forbidden status in response to a request from a client for a web page or it may indicate that the server can be reached and process the request but refuses to take any further action. " (wiki)
|
Alas. Do you think it would do any good to post this dismay in their community group discussion sections? |
Same exact problem here. |
I gave up on the R packages for Fitbit and ended up (1) using the fitbit API website to get an access token, (2) running the curl code from the terminal to get data, and then (3) R. Then in R: |
Did that work? |
I think patching fitbitscraper might be better if you have a workaround for auth... |
Any updates on this? Or a more detailed solution with the api? |
Hi. I got frustrated with Fitbit for not making it easier to get our data. And since this Fitbitscraper issue is not resolved as far as I know, I've made a tutorial on accessing data directly from the Fitbit API and also R codes for plotting the heart rate time course. In case it's useful to anyone, here it is |
It is very useful! I did receive an error though and I can't work around it. On the R side, rather than the API side. It could very well be me. Everything looks right in the text file, but then again I'm not quite sure what I'm looking for. I've downloaded the .json a few times to try it, but get this error each time. I'll keep working, but thank you!!
Super quick edit- I had to change it to line 30, rather than line 16. But it works! You rock! |
Ah, good to know. I guess the json file has variable number of headers. Mine has 14 lines of headers then a blank line before data starts. Thanks for the info. |
That's very helpful. When I get to the part, though, where I'm asked to
copy the parse response field, I dutifully copied:
#scope=activity%20heartrate%20location%20nutrition%20profile%20settings%20sleep%20social%20weight&expires_in=604800
but received the note:
Token response does not match the expected format; please check that you're
using the correct OAuth 2.0 flow.
I'm using Google Chrome to fill out the form- could that be the problem?
thanks for any insights! Phil
…On Thu, Oct 19, 2017 at 12:50 AM, squirrelB ***@***.***> wrote:
Hi. I got frustrated with Fitbit for not making it easier to get our data.
And since this Fitbitscraper issue is not resolved as far as I know, I've
made a tutorial on accessing data directly from the Fitbit API and also R
codes for plotting the heart rate time course. In case it's useful to
anyone, here it is
https://annofoneblog.wordpress.com/2017/10/19/your-
heart-your-calories-your-sleep-your-data-how-to-
extract-your-fitbit-data-and-make-graphs-using-r/
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYCgXP7dC8gWJD2ssY90NxoOdECuwZ-Fks5stuMYgaJpZM4PRk_8>
.
|
Hi, I suggest that you copy and paste the full web address into the "parse
response window" and it'll parse it out for you. I'd probably ignore the
specific instruction in the API website about the #scope.
[... just to be super clear with the instruction, when you click the link in the 1:Authorize step, it opens a new browser window where you select the data you want and click "allow". That takes you to a google page with a long web address... copy that entire address and paste it to the 2:Parse window. I hope that made sense. I know it can be confusing]
On Thu, Oct 19, 2017 at 11:00 AM, PhillipKWood <notifications@github.com>
wrote:
… That's very helpful. When I get to the part, though, where I'm asked to
copy the parse response field, I dutifully copied:
#scope=activity%20heartrate%20location%20nutrition%
20profile%20settings%20sleep%20social%20weight&expires_in=604800
but received the note:
Token response does not match the expected format; please check that you're
using the correct OAuth 2.0 flow.
I'm using Google Chrome to fill out the form- could that be the problem?
thanks for any insights! Phil
On Thu, Oct 19, 2017 at 12:50 AM, squirrelB ***@***.***>
wrote:
> Hi. I got frustrated with Fitbit for not making it easier to get our
data.
> And since this Fitbitscraper issue is not resolved as far as I know, I've
> made a tutorial on accessing data directly from the Fitbit API and also R
> codes for plotting the heart rate time course. In case it's useful to
> anyone, here it is
> https://annofoneblog.wordpress.com/2017/10/19/your-
> heart-your-calories-your-sleep-your-data-how-to-
> extract-your-fitbit-data-and-make-graphs-using-r/
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#20 (comment)-
337806388>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AYCgXP7dC8gWJD2ssY90NxoOdECuwZ-Fks5stuMYgaJpZM4PRk_8>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AeTmUUyVd_LgfFwbUzGXhGdbNwf2vJ01ks5st3IUgaJpZM4PRk_8>
.
--
K Mozhui
|
Really useful, squirrelB. Thanks a lot |
I was able to seamlessly get data from Fitbit using fitbitScraper on 5th Sept. But the same codes now resulting in a "login fail" message. Not sure what changed. Everything the same, worked one day but not anymore...
The text was updated successfully, but these errors were encountered: