quiet-evening-67975
10/05/2025, 4:27 PMtall-airline-16756
10/05/2025, 4:27 PMtall-airline-16756
10/05/2025, 4:27 PMenv.local file are set up correctly?
Having these details will really help us pinpoint what's going on and find the best solution together.quiet-evening-67975
10/05/2025, 4:28 PMtall-airline-16756
10/05/2025, 4:29 PMLIVEKIT_API_KEY and LIVEKIT_API_SECRET are correctly set in your environment and exactly match the values in your LiveKit Cloud project dashboard. You can test them easily using the LiveKit CLI:
lk room list --url wss://YOUR_PROJECT.livekit.cloud
Just replace YOUR_PROJECT with your actual subdomain. If the credentials aren’t correct, you’ll see a 401 error here.
1. Authenticate via CLI: Next, try running lk cloud auth to authenticate and link your project. Make sure to complete the browser sign-in within the time allowed. If you run into any trouble, you can revoke and re-authenticate with these commands:
lk cloud auth --revoke
lk cloud auth
1. Check Token Generation: It’s important that tokens are generated server-side using valid credentials. Here’s a quick example in Node.js to guide you:
import { AccessToken } from 'livekit-server-sdk';
const at = new AccessToken(apiKey, apiSecret);
at.identity = 'user123';
at.room = 'my-room';
const token = await at.toJwt();
Just make sure the apiKey and apiSecret you use here are the same as those in your LiveKit Cloud project.
1. Update SSL Certificates: If you’re encountering SSL issues, updating your CA certificates can help prevent handshake failures.
If you’re still having trouble after these steps, it’s a good idea to double-check the scope and permissions of your API key and confirm it hasn’t been revoked in the LiveKit Cloud console. I’m confident we’ll get this sorted out together!
Sources: Operational Guidance & Best Practices | livekit/livekit_composite | DeepWik... | README.md | Authentication | LiveKit Docs | protocol/unity_proto/UnityAPI.twirp.go | cmd/lk/cloud.go