blue-addition-24214
10/08/2025, 10:58 AMtall-airline-16756
10/08/2025, 10:59 AMtall-airline-16756
10/08/2025, 10:59 AMLiveKit API Key and LiveKit API Secret. This step helps ensure that the token was signed correctly, that the issuer (iss) matches your API key, and that the token is still valid.
LiveKit makes this easier by providing built-in token verification methods in its server SDKs for Python, Ruby, Go, and Rust. These SDKs handle the cryptographic details securely and automate the process for you. For example, in Python, you can use the TokenVerifier class like this:
from livekit.api import TokenVerifier
verifier = TokenVerifier(api_key="your_api_key", api_secret="your_api_secret")
claims = verifier.verify(jwt_token)
If you're working with a language that doesn’t have an official SDK, no worries! You can manually verify the JWT using a standard library that supports HMAC-SHA256 (HS256) signing. This involves decoding the token, checking the iss claim, verifying the expiration (exp), and making sure the signature is valid.
Please feel free to reach out if you'd like help with a specific SDK or if you'd prefer guidance on manual verification. I'm here to help! Sources: livekit-api/tests/test_webhook.py | lib/livekit/token_verifier.rb | auth/verifier_test.go | webrtc-sys/libwebrtc/boringssl_prefix_symbols.txt | Mini tutorial: setting up a LiveKit Cloud projectblue-addition-24214
10/08/2025, 11:00 AMtall-airline-16756
10/08/2025, 11:01 AMblue-addition-24214
10/08/2025, 11:01 AMtall-airline-16756
10/08/2025, 11:02 AMlk room list \
--url <your-livekit-url> \
--api-key <your-api-key> \
--api-secret <your-api-secret>
If your credentials are correct, this will show you a list of active rooms. If not, you might see an authentication error, which is totally okay — we can troubleshoot that next!
2. Create a Token:
lk token create \
--api-key <your-api-key> \
--api-secret <your-api-secret> \
--join --room test-room --identity test-user \
--valid-for 1h
If you get a token successfully, that’s a great sign your credentials are working just fine.
3. Set Default Project (Optional):
To make things easier and avoid typing your credentials every time, you can set your project in the CLI like this:
lk project add --api-key <your-api-key> --api-secret <your-api-secret> my-project
lk project set-default my-project
After that, just running:
lk room list
will confirm your credentials are set up and working smoothly. If you run into any issues or have questions, please don’t hesitate to reach out — I’m here to help! Sources: README.md | cmd/server/commands.go | livekit-agents/livekit/agents/cli/cli.py