Blizzard / s2client-proto

StarCraft II Client - protocol definitions used to communicate with StarCraft II.
MIT License
3.76k stars 430 forks source link

Response [403] from initial request #160

Open lbianculli opened 4 years ago

lbianculli commented 4 years ago

Hi. I have been unable to get a successful response when using download_replays.py. I set up a developer account with Blizzard and have triple-checked that I am using the correct key, secret, and version. I have not changed the code in the .py file at all. I was wondering if there is anything obvious I might be missing? Here is the entire trace:

Searching replay packs with client version: 4.9.1
Traceback (most recent call last):
  File "C:\Users\lbianculli\s2client-proto-master\samples\replay-api\download_replays.py", line 193, in <module>
    main()
  File "C:\Users\lbianculli\s2client-proto-master\samples\replay-api\download_replays.py", line 189, in main
    download(**args_dict)
  File "C:\Users\lbianculli\s2client-proto-master\samples\replay-api\download_replays.py", line 102, in download
    meta_file_urls = api.search_by_client_version(version)
  File "C:\Users\lbianculli\s2client-proto-master\samples\replay-api\download_replays.py", line 85, in search_by_client_version
    response = self.get(self.url("/data/sc2/search/archive"), params)
  File "C:\Users\lbianculli\s2client-proto-master\samples\replay-api\download_replays.py", line 64, in get
    raise RequestError("Request to '{}' failed. response={}".format(url, response))
__main__.RequestError: Request to 'https://us.api.blizzard.com/data/sc2/search/archive' failed. response=<Response [403]>
tangzk commented 4 years ago

+1, I have encountered this problem when I run this script to download 4.1.3 replays.

lbianculli commented 4 years ago

Wanted to send an update. I have not had trouble with responses from other API calls -- ladder statistics for example.

xCharlesxx commented 4 years ago

+1, I'm also having this problem trying to download 4.10.1 replays. The code successfully requests a token from ClientID and client Secret and establishes connection but returns '403 forbidden' when trying to access requested data

lbianculli commented 4 years ago

Hi. If anyone had forgotten about this but was still curious: I just tried running today for 4.9.1 and it worked. Thanks!