cyberjunky / python-garminconnect

Python 3 API wrapper for Garmin Connect to get activity statistics
MIT License
964 stars 149 forks source link

/modern does not work #102

Closed andgineer closed 1 year ago

andgineer commented 1 year ago

If I remove it from URL I am getting good responses. With '/modern' this is 402

cyberjunky commented 1 year ago

For all URL's? Did they change the website perhaps?

andgineer commented 1 year ago

https://github.com/cyberjunky/python-garminconnect/pull/103

andgineer commented 1 year ago

well I just requested steps

andgineer commented 1 year ago

upps that's not that so straightforward - for me it works without /modern for "steps" but to get heart rate infor you do need "/modern/"

cyberjunky commented 1 year ago

Do you use the latest code? If i test with the example.py program, option 8 still works for me, weird..

8 -- Get steps data for '2022-12-16'

Executing: Get steps data for '2022-12-16'

-------------------- api.get_steps_data('2022-12-16') --------------------
[
    {
        "startGMT": "2022-12-15T23:00:00.0",
        "endGMT": "2022-12-15T23:15:00.0",
        "steps": 0,
        "primaryActivityLevel": "sedentary",
        "activityLevelConstant": true
    },
...

Can you try this?

andgineer commented 1 year ago

hm and now it really works But at the morning I got `Executing: Get steps data for '2022-12-16'

ERROR:main:Error occurred: Forbidden url: https://connect.garmin.com/modern/proxy/wellness-service/wellness/dailySummaryChart/MasterAndrey`

andgineer commented 1 year ago

Ok close as temporary Garmin's API problems

cyberjunky commented 1 year ago

The forbidden url error is annoying, it seems related to the session expired or something, later I will try to add some logic to example file to see if that fixes it.