Lately as a gift I got a Polar A300 watch that gives a lot of data to user. There is a web and mobile application to it. Check out the API that you can use to access data for your own application!

To The Point

API

There is PolarAccessLink API from which you can access data gathered by A300 watch.

From this API I've found python example usage for polaraccesslink on github.

To create your ClientId and ClientSecret used in the polar-example, first create your Polar account and then login at PolarAccesLink Admin.

Then click on Create a Client, fill all the forms and as a result you will have ClientId and Client Secret.

Reusing Example code

First let's clone our example repository with:

git clone https://github.com/polarofficial/accesslink-example-python.git
cd accesslink-example-python/
pipenv --python 3.6
pipenv install requests

Update the config.yaml with ClientId and ClientSecret.

Then let's create OAuth access token, first starting auth_service available at localhost:5000:

pipenv run python authorization.py

Access the localhost:5000 from which you will login to your own UserId and create your OAuth Token for application.

You can now use the api with example and extend it's usage beyond what is available at :

pipenv run python accesslink_example.py

Acknowledgements

Auto-promotion

Related links

Thanks!

That's it :) Comment, share or don't - up to you.

Any suggestions what I should blog about? Post me a comment in the box below or poke me at Twitter: @anselmos88.

See you in the next episode! Cheers!



Comments

comments powered by Disqus