Python-Wrapper icon indicating copy to clipboard operation
Python-Wrapper copied to clipboard

API Keys do not work

Open mjlomeli opened this issue 2 years ago • 3 comments

I've used this program before many times, so I'm sure I'm following it correctly. Any ideas?

image

mjlomeli avatar Apr 21 '23 22:04 mjlomeli

image

mjlomeli avatar Apr 21 '23 22:04 mjlomeli

Just pushed an update to this. The API has changed since this was written. The changes should work, however please refer to the docs for more info - https://xapi.us/docs

djekl avatar Apr 22 '23 10:04 djekl

I'm still getting the error. are you on PyPi xapi version - 2.0.1 ?

Lets see, I have the live account registered image

I created the API token

image

client = Client(api_key='the api key')
client.calls_remaining()

ERROR:xboxapi:XboxAPI error: (401) Unauthorized Traceback (most recent call last): File "C:\Users\optimus\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\231.8109.197\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode coro = func() File "", line 1, in File "C:\Users\optimus\Desktop\Xbox-SDK.venv\lib\site-packages\xboxapi\client.py", line 98, in calls_remaining limit_headers['X-RateLimit-Reset'] = server_headers['X-RateLimit-Reset'] File "C:\Users\optimus\Desktop\Xbox-SDK.venv\lib\site-packages\requests\structures.py", line 52, in getitem return self._store[key.lower()][1] KeyError: 'x-ratelimit-reset'

mjlomeli avatar May 14 '23 03:05 mjlomeli