03-30-2015 12:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-30-2015 12:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am having a bit of trouble authenticating my users.
I post here to request the tokens.
POST /oauth/request_token
oauth_token and oauth_verifier are returned. I pass these to the next function that returns profile XML.
But then when I try and call the profile I get this error message...
Fatal error: Uncaught exception 'FitBitException' with message 'Fitbit request failed. Code: 401' in /var/www/html/MODULES/fitbitphp-master/fitbitphp.php:325 Stack trace: #0 /var/www/html/MODULES/Fitness_Devices/fitbit_profile.php(37): FitBitPHP->getProfile() #1 {main} thrown in /var/www/html/MODULES/fitbitphp-master/fitbitphp.php on line 325
When I check the authentication of the user with the system says that the user is not authenticated. But I clearly went to the fitbit login section and the proper keys were returned.
Can anyone see what I am doing wrong?
Thanks.

- Labels:
-
Linux
-
OAuth 1.0a
-
PHP
-
Subscriptions API
03-30-2015 15:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



03-30-2015 15:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
What does the body of the 401 HTTP error say? It will describe the problem.

03-31-2015 07:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-31-2015 07:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-31-2015 08:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-31-2015 08:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
As message says you'r probably using invalid signature OR/AND token
Senior Software Developer at Fitbit

03-31-2015 08:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-31-2015 08:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-31-2015 08:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-31-2015 08:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Try to generate CURL string and make request from this page: https://dev.fitbit.com/apps/oauthtutorialpage
Senior Software Developer at Fitbit

03-31-2015 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-31-2015 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-01-2015 11:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-01-2015 11:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Are you aware of any way to see what keys are valid keys without passing them to the API? Perhaps some type of console that lists the available keys. Even if it is just pulic keys, it would make debugging much easier.
Thanks.

