WSServerHandshakeError: 401

Hey, I’m building an AI-voice assistant having client-server relationship with agent functionality an was almost complete, just few parts of the agent functionality was remaining and was working fine and I had a few days off like after 10 or 12 days I tried to continue from the part where I left off which was working fine on the day i left. But now few days ago which was 10-03-2026 it started showing this” WSServerHandshakeError: 401,” which i solved it buy replacing the old api keys with the new ones which was not just another set of new keys generated in the same project, also had to create a new project then the keys from the new project worked. But again after 2 days when I tried to run the file it again started showing the same error, i tried to generate worker token but was in vain it didn’t produce showed error on the last phase and was stuck in loop. Now nothing is working changing old project’s api keys, not even after creating new projects and new keys.

This is the latest projects= WSServerHandshakeError: 401 … url=‘wss://ai-voice-assistant-3esdkp5e.livekit.cloud/agent’ could anyone from @LiveKit-Staff verify if the project is active and support agent.

I would be grateful if this works as fast as possible cause this is for my final year project and the college has already given notice to submit project proposal and it was also the same day the error started :expressionless: .

I see you were able to connect to the agent from the playground, so I assume this is an issue with your custom front end connecting?

could anyone from LiveKit-Staff verify if the project is active and support agent.

Yes, it is still active - we do not disable unused agents

The most likely causes are:

  • Some issue with the token generation. We recently made some changes to make token generation easier for POC and dev projects, perhaps take a look at React voice AI quickstart | LiveKit Documentation ? I notice the token server is disabled in your project settings.
  • Incorrect API keys being used (but since this worked previously, and you only have one project in your account, this is unlikely)