Comments (2)
Hi @karthikarul20
I think I am to blame for your troubles. If there was better documentation it probably would be easier for you.
So a couple things:
- The authorize url you are using is wrong, the base should be www.fitbit.com instead of api.fitbit.com.
- There is no need to build the authorize url yourself, we have a function for that;
authorize_token_url
. I've included some example code below. - The most recent version of the library changed the
user_key
anduser_secret
kwargs toresource_owner_key
andresource_owner_secret
respectively, butNone
is the default so they don't need to be specified here. - Fitbit will only redirect to your callback_uri if the app type on dev.fitbit.com is "Browser"
- Now that you have publicly posted your Fitbit app key/secret, I highly recommend you reset them.
import webbrowser
from fitbit import Fitbit
client_kwargs = {
'client_key': 'c8ca82f890c44a969cc3524b7c342e8b',
'client_secret': '7bf3dd8b933144e2bbe2c7971d46e3ae',
'callback_uri': 'http://127.0.0.1/test'
}
fb = Fitbit(**client_kwargs)
fb.client.fetch_request_token()
webbrowser.open(fb.client.authorize_token_url())
Let me know how that works out for you.
from python-fitbit.
Thanks Brad. App type on dev.fitbit.com was the culprit. It was set as Desktop and now it works fine.
Also i have reset the client_key and client_secret as you recommended.
from python-fitbit.
Related Issues (20)
- Problems with Auth 2.0 HOT 3
- Help needed?
- How to get activity statistics by activity type when its started from the tracker?
- unable to get sleep summary data using time_series('sleep') HOT 2
- Source tarball on PyPi does not include tests or tox config
- Error trying to get heart data HOT 4
- Close Chrome tab after validating API HOT 3
- AttributeError: module 'fitbit' has no attribute 'Fitbit' HOT 1
- Works well Locally, but not Deployed
- Add multi-date functionality
- Force sync HOT 1
- wait_for_tstate_lock: ENGINE Waiting for thread Thread-4
- fitbit do not allow callback URLs with http anymore HOT 2
- Add lifetime stats, friends and badges API HOT 1
- [INFO] Repo not maintained anymore ? HOT 13
- Unable to establish connection with Fitbit API
- Exporting Breathing Rate Intraday by Date HOT 10
- urllib failure
- TCX endpoint decoding error error
- Download Skin Temperature and SpO2 data HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-fitbit.