polarofficial / accesslink-example-python

This is an example application that uses the Polar Open AccessLink API. https://polar.com/developers
MIT License
145 stars 68 forks source link

Retrieve data prior to authorization date #14

Open lars-petter-hauge opened 4 years ago

lars-petter-hauge commented 4 years ago

From what I understand, currently it is only possible to retrieve data that has been synced after the authorization date. Would it not be beneficial to make it possible to also access data prior to that date? Or at least let it be up to the user authorizing the application whether it should allow it to retrieve data from the past?

By the way, I'm really happy that the API exists at all!

asib commented 4 years ago

It's also ridiculously difficult to scrape flow.polar.com in order to programatically export historical sessions. I have a good year and a half of historical data that I wanted to sync to a Strava account I've just created, but Polar expect me to individually export each of my hundreds of historical sessions in order to do so.

RoelVanderPaal commented 4 years ago

@asib you can export a zip with all data with this procedure: https://support.polar.com/en/how-to-download-all-your-data-from-polar-flow

mado89 commented 2 years ago

@asib Which endpoints did you use to query all the sessions in order to export them?

fortysix2ahead commented 2 years ago

@mado89 The endpoints of flow.polar.com are not documented anywhere. Unfortunately you have fire up the developer tools of your browser to find out which endpoints are called.

mado89 commented 2 years ago

Thx. But this also means working out how to authenticate against a different API because this API needs a polar_session cookie and not a token, right?

asib commented 2 years ago

@asib Which endpoints did you use to query all the sessions in order to export them?

I didn't try to use the API, I just used selenium - see this repo.