I'm getting this error when trying to connect my a...
# ask-ai
e
I'm getting this error when trying to connect my agent to the playground: 2025-08-09 202716,616 - WARNING livekit.agents - failed to connect to livekit, retrying in 0s Traceback (most recent call last): File "C:\Users\User\Documents\coding\agent-starter-python\.venv\Lib\site-packages\livekit\agents\worker.py", line 648, in _connection_task ws = await self._http_session.ws_connect( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\Documents\coding\agent-starter-python\.venv\Lib\site-packages\aiohttp\client.py", line 1084, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 401, message='Invalid response status', url='wss://test-vqxeewtf.livekit.cloud/agent'
t
Thanks for reaching out, jollymask. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The error you’re seeing usually means there’s a problem with authentication, probably because the access token is missing or not quite right. Could you share a bit about how you generated the token, like which API key and secret you used? Also, are you sure the permissions for the room and participant are set correctly? I’m here to help you sort this out! Sources: Authentication | LiveKit Docs | Running LiveKit on AWS