a
hello
t
Thanks for reaching out, Aditya. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
a
(livekit_env) C:\Users\adity\Desktop\AI-Livekit-Projects\starter-agent>lk agent create WARNING: config file C:\Users\adity/.livekit/cli-config.yaml should have permissions 600 WARNING: config file C:\Users\adity/.livekit/cli-config.yaml should have permissions 600 Using default project [koel-ai-client-demo-project] Creating new agent Using secrets file [.env] unable to get client settings: Error from intermediary with HTTP status code 401 "Unauthorized"
t
Hi there! How can I help you today? I'm here to make sure we get everything sorted out for you.
a
(livekit_env) C:\Users\adity\Desktop\AI-Livekit-Projects\starter-agent>lk agent create WARNING: config file C:\Users\adity/.livekit/cli-config.yaml should have permissions 600 WARNING: config file C:\Users\adity/.livekit/cli-config.yaml should have permissions 600 Using default project [koel-ai-client-demo-project] Creating new agent Using secrets file [.env] unable to get client settings: Error from intermediary with HTTP status code 401 "Unauthorized"
t
It looks like you're encountering the error "unable to get client settings: Error from intermediary with HTTP status code 401 Unauthorized," which happens when the LiveKit CLI can't authenticate with the server. Don't worry, we can get this sorted out together! To fix this, please double-check and set up your credentials using one of these friendly methods: 1. Authenticate via the CLI using
lk cloud auth
(Recommended):
Just run
lk cloud auth
to start a simple browser-based sign-in process. This will safely save your project credentials (API key, secret, and URL) in a local config file for you. 2. Provide Credentials via Environment Variables: You can set your credentials as environment variables like this: `export LIVEKIT_URL="https://your-subdomain.livekit.cloud" export LIVEKIT_API_KEY="your_api_key" export LIVEKIT_API_SECRET="your_api_secret"`After that, try running your command again. 3. Provide Credentials via Command-Line Flags: Alternatively, you can pass your credentials directly when running the
lk
command:
Copy code
lk agent create \
  --url "https://your-subdomain.livekit.cloud" \
  --api-key "your_api_key" \
  --api-secret "your_api_secret"
Just make sure your credentials are accurate and haven’t been revoked—you can always find them in your LiveKit Cloud dashboard. If you hit any bumps or need more help, feel free to reach out. I'm here for you! Sources: replay/cloud_replay.twirp.go | cmd/lk/utils.go