Karen_Karr
(Karen Karr)
October 8, 2026, 12:05pm
1
Hello LiveKit Team,
I’m developing a web and mobile application using LiveKit Cloud and am experiencing an authentication issue with my development project.
Problem
The official LiveKit server SDK returns HTTP 401 with an invalid-API-key indication when calling RoomServiceClient.listRooms().
The failing request is:
POST https://<project-redacted>.livekit.cloud/twirp/livekit.RoomService/ListRooms
The request uses a Bearer token with the roomList permission.
Troubleshooting already completed
Our engineering team has verified the following:
The API URL, API key and API secret are loaded correctly from the local environment file.
The JWT uses HS256 signing with the API key as issuer.
The token signature verifies locally.
The required roomList grant is present.
Token timing and system clock alignment are correct.
The request uses the official LiveKit SDK and supported endpoint.
URL normalization preserves the correct host.
Independent authentication tests outside our application also return HTTP 401.
Direct and proxy-configured requests produce the same result.
Additional information
The LiveKit Cloud project is named “DSL Development”. Its API Keys page lists an initial default key and another key labeled “DSL Development API”.
The dashboard does not show an obvious active/inactive status for either key.
Request for assistance
Could you please help determine:
Whether the API key is active and correctly registered to this project.
Whether any project-side configuration or restriction could cause this authentication failure.
Whether there are additional safe diagnostic steps we should perform.
We can provide sanitized technical logs if required.
Thank you for your assistance.
Hello LiveKit Team,
Following further investigation, our engineering team has narrowed down the authentication issue.
We confirmed that:
All three LiveKit environment variables load correctly from our protected local configuration file.
No inherited environment variables override these credentials.
The official LiveKit server SDK version 2.19.1 independently returns HTTP 401 when calling RoomServiceClient.listRooms().
The exact sanitized error is: “invalid API key for domain [redacted]” .
The endpoint, JWT signing mechanism and required roomList permission have been verified.
Clock alignment, TLS and proxy checks have not identified a cause.
The authentication failure occurs independently of our application’s business logic.
Our development project lists both an original default API key and a separately generated development API key.
Could LiveKit staff please confirm whether the separately generated key is registered, active and associated with the correct project’s API domain?
Could you also investigate whether a key-propagation issue, domain-mapping problem or project restriction could explain this rejection?
We would appreciate guidance on resolving this without unnecessarily rotating or replacing credentials.
Thank you.
From the logs it looks like wrong key for the domain:
request error: invalid API key for domain d...md.livekit.cloud
Hello CWilson,
Thank you for checking the logs.
We have now independently verified in the LiveKit Cloud dashboard that:
The configured LIVEKIT_URL hostname exactly matches the Project URL hostname displayed for our DSL Development project.
The configured API key exactly matches the separately generated API key listed under that same project.
Our independent official SDK test still returns HTTP 401: “invalid API key for domain”.
Therefore, the project URL and API key association appears correct from the dashboard and local configuration.
Could you please investigate whether this key is correctly registered and active in LiveKit’s authentication system, whether its associated secret is recognized, and whether there is a domain-binding or key-propagation issue?
Please advise whether a key rotation is actually necessary before we attempt one.
Thank you for your assistance.
The problem is not on our side. Check your domain again. Make sure you did not swap characters like o and 0 or other similar looking characters.