This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Connect API - Activity List 'Payment Required'

https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities does not seem to work anymore.  HTTP ERROR 402 'Payment Required'.  Anyone know the new address or what the issue is?

Other similar functions still work e.g. connect.garmin.com/.../<insert>.fit

  • The address is the same. Now you need to be logged in to access those URLs. You also need to set the "nt" header in the request.

    I'm using this project to fetch data from Garmin: https://github.com/10REM/php-garmin-connect

  • Yes, as above, you need the correct header to open it.

    To sum it up, you can use:

    • Web-browser's Network tab, manually check response for that URL as page loads and copy what needed.
    • External scripts for Python etc. which support whole log-in process.
    • Web-browser's Console, where you can make a short script like below which prints wanted data.

    jQuery.getJSON(
        'https://connect.garmin.com/modern/proxy/activitylist-service/activities/search/activities?limit=10',
        (act_list) => {
            act_list.forEach((act) => {
                console.dir(act.activityId, act.activityName, act.startTimeLocal)
            })
        }
    )

  • Thanks for the response.  I managed to get this working using Chrome's console whilst being in the window of the logged in Garmin Connect page.  I used to be able to log, then open a new tab and get the activity list, but that is returning the HTTP Error 402.  I'll have a go at the github link you provide.