This is an example application that uses the Polar Open AccessLink API. With the Polar Open AccessLink you can access the training and daily activity data recorded with Polar devices.
- Polar Flow account
- Python and pip
Navigate to https://admin.polaraccesslink.com. Log in with your Polar Flow account and create a new client.
Use http://localhost:5000/oauth2_callback
as the authorization callback domain for this example.
Fill in your client id and secret in config.yml:
client_id: 57a715f8-b7e8-11e7-abc4-cec278b6b50a
client_secret: 62c54f4a-b7e8-11e7-abc4-cec278b6b50a
pip install -r requirements.txt
User account needs to be linked to client application before client can get any user data. User is asked for authorization in Polar Flow, and user is redirected back to application callback url with authorization code once user has accepted the request.
To start example callback service, run:
python authorization.py
and navigate to 'https://flow.polar.com/oauth2/authorization?response_type=code&client_id=CLIENT_ID' to link user account.
python accesslink_example.py
Once user has linked their user account to client application and synchronizes data from Polar device to Polar Flow, application is able to load data. Selecting 'Check available data' option from example application menu loads the synchronized data from Polar Flow and prints it on the screen.