I’m encountering a “Method Not Allowed” error when calling the session API in remote mode, even though my API key seemed valid.
The GET request to /sessions/{session_id} returns {'detail': 'Method Not Allowed'}.
Could you please confirm:
- Is GET the correct HTTP method for retrieving session information?
- What is the expected API endpoint and request format?
The error occurs at line 151 in runner.py when trying to get mcp_urls from the session response.
Thank you.
Logs:
Traceback (most recent call last):
File "/Users/user_name/Documents/orak/orak-2025-starter-kit/./run.py", line 54, in <module>
main()
File "/Users/user_name/Documents/orak/orak-2025-starter-kit/./run.py", line 40, in main
asyncio.run(runner.evaluate_all_games())
File "/opt/homebrew/Cellar/python@3.11/3.11.13/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.13/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.13/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/user_name/Documents/orak/orak-2025-starter-kit/evaluation_utils/runner.py", line 125, in evaluate_all_games
await asyncio.gather(*tasks)
File "/Users/user_name/Documents/orak/orak-2025-starter-kit/evaluation_utils/runner.py", line 151, in start_game
mcp_url = self.session.get()["mcp_urls"][game_name]
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'mcp_urls'
More examinations:
$ uv run python
Python 3.11.13 (main, Jun 3 2025, 18:38:25) [Clang 17.0.0 (clang-1700.0.13.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests, os
>>> result = requests.get('https://orak-game-api.aicrowd.com/sessions', headers={"Authorization": f"Token {os.getenv('AICROWD_API_TOKEN')}"})
>>> result
<Response [405]>
>>> result.text
'{"detail":"Method Not Allowed"}'
$ uvx --from aicrowd-cli aicrowd login
Please login here: https://api.aicrowd.com/auth/Z1J...hY
API Key valid
Gitlab access token valid
Saved details successfully!