Not permitted: not authenticated while trying to login
wzieba opened this issue · 1 comments
Summary
Recently, with credentials that always worked, I've started to receive error response from Call of Duty API:
{
'status': 'error',
'data': {
'type': 'com.activision.mt.common.stdtools.exceptions.NoStackTraceException',
'message': 'Not permitted: not authenticated'
}
}
With given credentials I'm able to login and browse stats on https://my.callofduty.com/ website or in mobile app. I've also tried many different credentials, always the same error.
This is similar to the issue described in this article from 1 March 2019 https://charlieintel.com/call-of-duty-api-changes-kill-third-party-statistic-tracking-websites-and-services/52576/
Reproduction Steps
async def get_data() -> Report:
client = await callofduty.Login("", "")
client.GetMySquad() # or any other call
...
Expected Results
There's no error returned from API and data is received.
or
There's confirmation that the issue only appears in my project.
Actual Results
Snippet described in Reproduction Steps
returns error described in Summary
Traceback:
Traceback (most recent call last):
File "<project_path>venv/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "<project_path>venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "<project_path>venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "<project_path>venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "<project_path>venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "<project_path>venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "<project_path>venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "<project_path>venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "<project_path>venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "<project_path>venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "<project_path>cod_stats/start.py", line 125, in hello_world
self._py_db_command_thread_event = py_db._py_db_command_thread_event
File "<project_path>venv/lib/python3.8/site-packages/nest_asyncio.py", line 95, in run_until_complete
return f.result()
File "<pyenv_path>versions/3.8.5/lib/python3.8/asyncio/futures.py", line 178, in result
raise self._exception
File "<pyenv_path>versions/3.8.5/lib/python3.8/asyncio/tasks.py", line 280, in __step
result = coro.send(None)
File "<project_path>cod_stats/start.py", line 32, in get_data
from _pydev_imps._pydev_saved_modules import thread
File "<project_path>cod_stats/start.py", line 33, in <listcomp>
from _pydevd_bundle import pydevd_io, pydevd_vm_type
File "<project_path>venv/lib/python3.8/site-packages/callofduty/client.py", line 595, in GetPlayerProfile
await self.http.GetPlayerProfile(
File "<project_path>venv/lib/python3.8/site-packages/callofduty/http.py", line 219, in GetPlayerProfile
return await self.Send(
File "<project_path>venv/lib/python3.8/site-packages/callofduty/http.py", line 113, in Send
raise HTTPException(res.status_code, data)
Checklist
- I have searched the open Issues for duplicates
- I have shown the entire traceback, if possible
- I have removed my token from display, if visible
System Information
Python version: 3.8.5
callofduty.py: 1.2.1
operating system: tested on macOS and Linux
Squads endpoints are known to have issues currently due to API changes. However, you shouldn't have any issues using the rest of the library. Please try again with the latest version (v1.2.2).