-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected HTTP error (503) #18
Comments
Uh oh! The URL you provided works for me (replacing the xxxxxx, of course). To clarify, does it work for you, too? |
The url used by script (http://connect.garmin.com/proxy/activity-service-1.1/gpx/activity/) does not work. |
@tymmej you're right. It does not work. any idea about how to fix it? |
Using same url as browser? |
I tried but it does not work. Maybe @kjkjava can help us |
Or User-agent |
@tymmej @kjkjava
However, I'm getting the following error message when getting some tcx (I don't know why) |
The endpoint http://connect.garmin.com/proxy/activity-service-1.1/gpx/activity has been "retired" (deprecated) apparently. If what you want is GIS coordinate data, you can get that directly as JSON using their activityDetails endpoint, which is more efficient than downloading a GPX file and parsing it anyway. |
@frechina can you share patch? |
@frechina |
@tymmej your comment about data point frequency is interesting. I assumed the points would be the same regardless of file format, and never bothered to look. Can someone confirm this? I got the idea for using the json endpoint from Tapiriik, in this file |
@ebrensi JSON with ?full=true at and of url GPX exported in browser: JSON even doesn't have info about date of activity. Edit: |
I managed to make this work using the 1.2 API: I only made a change to the tcx line (I'm importing historical data to Strava) pull request added: diff --git a/gcexport.py b/gcexport.py |
@thedbexp That's not resolving for other filetypes: for gpx "endpoint is retired". |
GPX download was not working for me, changing the url_gc_gpx_activity to solved the issue for me |
I'm getting error on this url which gets activities http://connect.garmin.com/proxy/activity-search-service-1.0/json/activities guys, does it work for you ? |
I think Garmin just shut down this endpoint. It could have been because of me. I just applied for access t to the Wellness API through the Garmin developer program (http://developer.garmin.com/wellness-api/overview) and in my application I mentioned my app and the informal API I'm using. Then a few days later it no longer works. The reply I got from them, by the way, was
|
I don't believe the endpoint is down. When in a browser and logged into Garmin Connect I can load https://connect.garmin.com/proxy/activity-search-service-1.2/json/activities?start=0&limit=1 successfully. I think they must have changed the required cookie or auth headers in a way that is breaking the code. I haven't worked it out yet. |
@moderation you're right. However I checked all the login process and seems so similar than before |
I got it. You need to call these endpoint at the end of the login process GET 'http://connect.garmin.com/modern'; |
@frechina That worked! Amazing. How did you work that out? My heavily modified but working fork is at https://github.com/moderation/garmin-connect-export if anyone is interested. |
@moderation I used interceptor (from Postman) to capture all request made during Garmin login process. Then, after inspecting such amount of request I realised that the important ones were /modern and /legacy/session ;) |
@moderation Awesome https://github.com/moderation/garmin-connect-export working out of the box. I just needed to replace the old one with yours. Merci for the fork |
thx a lot! |
added two additional GET requests as suggested in kjkjava#18 (comment) this also solves kjkjava#21
updated URLs as suggested in kjkjava#18 (comment) solves kjkjava#18 (comment)
Thanks everyone for finding the solution to the issues and implementing the fixes. I created a pull request containing the authentication and activity download fixes (no refactoring). I'm aware there were already forks working but I wanted to see if this could be merged into @kjkjava upstream repo. Meanwhile you can use clone my fork https://github.com/fjgal/garmin-connect-export |
the service to get details of activity doesn't work any more (The requested endpoint is retired): |
Could it be this? |
Hi,
I'm using latest version of script.
I get
raise Exception('Failed. Got an unexpected HTTP error (' + str(e.code) + ').') Exception: Failed. Got an unexpected HTTP error (503).
when trying to run script. Last week everything was working.
I tried putting url (url_gc_gpx_activity + a['activity']['activityId'] + '?full=true) and I get
The requested endpoint is retired
URL for downloading through browser is https://connect.garmin.com/modern/proxy/download-service/export/gpx/activity/12691xxxxxx
The text was updated successfully, but these errors were encountered: