kjkjava / garmin-connect-export

Download a copy of your Garmin Connect data, including stats and GPX tracks.
MIT License
314 stars 134 forks source link

Error 403 forbidden #21

Open TobiasGirschick opened 8 years ago

TobiasGirschick commented 8 years ago

Hey,

first of all thanks for the nice tool! I've been using it for some months now. Unfortunately, since yesterday(?) I get the following error regardless of the parameters I use. The password and username are correct. I verified it via Garmin Connect web interface:

Welcome to Garmin Connect Exporter! Warning: Output directory already exists. Will skip already-downloaded files and append to the CSV file. Traceback (most recent call last): File "gcexport.py", line 155, in result = http_req(url_gc_search + urlencode(search_params)) File "gcexport.py", line 70, in http_req response = opener.open(request, data=post) # This line may throw a urllib2.HTTPError. File "/usr/lib/python2.7/urllib2.py", line 410, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 442, in error result = self._call_chain(_args) File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(_args) File "/usr/lib/python2.7/urllib2.py", line 629, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/lib/python2.7/urllib2.py", line 410, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 448, in error return self._call_chain(_args) File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(_args) File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 403: Forbidden

Any changes on Garmin side? Can you reproduce the problem or do I have canged something here that I am not aware of atm?

moderation commented 8 years ago

@TobiasGirschick follow the comments thread on this issue for the fix - https://github.com/kjkjava/garmin-connect-export/issues/18#issuecomment-243811213. My fork which has the necessary GET calls and works is linked to from the comments.

TobiasGirschick commented 8 years ago

thx. Worked out of the box!

fjgal commented 7 years ago

Thanks @moderation for implementing the solution. I created a pull request containing the authentication and activity download fixes (no refactoring) 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