I have an issue where participants left the room b...
# ask-ai
r
I have an issue where participants left the room but the room is still active, how can I delete the room? cause it’s causing costs on our side
✅ 1
t
Thanks for reaching out, luisa. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I understand this is urgent since the active room is causing costs. I’ll help you remove it and prevent future occurrences. What I’m responding to: your room stayed active after participants left and you want to delete it to stop charges. Quick actions you can take now • Delete the room via the LiveKit API (this immediately terminates the room and stops compute/bandwidth): ◦ Python example:
Copy code
from livekit import api
    api_client = api.LiveKitAPI(LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET)
    await api_client.room.delete_room(api.DeleteRoomRequest(room="your-room-name"))
• Node.js example:
Copy code
const roomServiceClient = new RoomServiceClient(LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET);
    await roomServiceClient.deleteRoom("your-room-name");
• Ensure the environment variables
LIVEKIT_URL
,
LIVEKIT_API_KEY
, and
LIVEKIT_API_SECRET
are set for the credentials used to manage rooms. Ways to avoid this in future • Use unique room names (timestamp or UUID) so sessions aren’t accidentally reused. • Automate deletion when the human participant leaves (call DeleteRoom at your end-of-session logic). • Subscribe to
room_finished
webhooks to detect room lifecycle events and run cleanup tasks. To proceed, please tell me: • The room name (or ID) you want deleted, and • Whether you prefer me to provide the exact API call for your environment (Python or Node.js). If you’d like, I can give a ready-to-run snippet tailored to your setup. Sources: Job lifecycle | LiveKit Documentation | Avoiding Room ID Reuse When Re-Creating Rooms With the Same Name | Towards a future-aligned pricing model | LiveKit, with interactive elements
r
I tried that but it keeps saying room not found even tho I see it in the UI
t
Thanks — I hear your frustration. You're seeing the room in the UI but DeleteRoom returns "room not found." I can help diagnose and fix this quickly. Please provide: • The exact room name (copy/paste) you used in the UI and in the API call. • The exact DeleteRoom request or command you ran (redact secrets). • Which SDK or method you used (Python, Node.js, direct REST/gRPC). • The LIVEKIT_URL you pointed the request at (redact hostname if needed). • Any full error output (HTTP status, stack trace). Quick troubleshooting steps to check while you gather that info: • Confirm the room name is exactly the same (case-sensitive, no hidden whitespace). • Confirm you're calling the same LiveKit deployment/cluster shown in the UI (match
LIVEKIT_URL
). • Verify you’re using admin credentials (
LIVEKIT_API_KEY
/
LIVEKIT_API_SECRET
) for that deployment. • If you used a client SDK/browser token, it cannot delete rooms — the server/admin SDK or RoomService is required. • Try listing rooms (RoomService listRooms) against the same URL/credentials to see what the API returns. Send the requested details and I’ll give the exact command/snippet to delete the room or walk through additional steps based on what we find. , with interactive elements
r
I see these rooms as active yet I am not able to delete them! they have been running for 24h
t
Thanks — I see the rooms listed as ACTIVE in your screenshot and you can’t delete them. I’ll help troubleshoot so we can remove them and stop billing. First, please provide these exact details: • One room ID from the UI (copy/paste the full string, e.g.,
RM_RcqkT8Qn237w
). • The exact DeleteRoom command or request you ran (redact secrets). • Which method/SDK you used (Python, Node.js, REST/gRPC). • The
LIVEKIT_URL
you pointed your request at (you can redact the hostname if you prefer). • Full error output you receive (HTTP status, error message). While you gather that, please try these checks (they often reveal the issue): • Confirm the room ID is exact (case-sensitive, no hidden whitespace). • Call RoomService listRooms with the same URL/credentials to see what the API returns. • Confirm you’re using admin credentials (
LIVEKIT_API_KEY
/
LIVEKIT_API_SECRET
) for that deployment — client/browser tokens cannot delete rooms. • Ensure the request targets the same LiveKit deployment shown in the UI (match
LIVEKIT_URL
). • If you used gRPC, try the language SDK or the same-room REST/gRPC endpoint you used to create/list rooms. Once you share the requested details I’ll give the exact command/snippet to delete that room from your environment or walk through next steps. , with interactive elements
r
Why not? We have people abusing our system and they call and don't hanguo
t
You’re right to be upset — having people abuse your system and leave rooms running 24/7 will drive costs and disrupt service. I can help shut these rooms down and add protections to prevent recurrence. First, to delete the running room(s) I need one thing from you now: • One full room ID from the UI (e.g.,
RM_RcqkT8Qn237w
) — copy/paste the exact string. Also confirm these so I can diagnose why DeleteRoom returned “room not found”: • The exact DeleteRoom command/request you ran (redact secrets). • Which SDK/method you used (Python, Node.js, REST, or gRPC). • The
LIVEKIT_URL
you targeted (you may redact hostname if needed). • The full error response (HTTP status or error message). Immediate checks to run while you send that: • Ensure the room ID has no extra spaces and matches case exactly. • Use the same admin credentials (`LIVEKIT_API_KEY`/`LIVEKIT_API_SECRET`) and
LIVEKIT_URL
that the UI points to — client/browser tokens cannot delete rooms. • Call RoomService listRooms with those credentials to confirm the API sees the room. Ways to stop this from happening again (options you can implement now): • Enforce a maximum room/session duration (auto-expire) at session end or via server-side logic. • On participant disconnect events, call
DeleteRoom
automatically if the human/owner left. • Require authentication or rate limits for callers (block anonymous dialing) and validate caller identity before allowing room creation. • Monitor
room_finished
webhooks and run cleanup scripts or alerts when rooms exceed expected duration. Send the room ID and the requested details and I’ll give the exact delete command for your environment and walk you step‑by‑step to remove the active rooms and add protections. , with interactive elements
r
It doesn't make sense what you suggest. It means they need to hangup for all of it to work
t
You're right — you should not need participants to hang up for a room to be deleted. DeleteRoom forcibly terminates a room and stops billing; it does not require participants to disconnect first. What I need to resolve the "room not found" error and delete the rooms for you: • One full room ID from your UI (copy/paste, e.g.,
RM_RcqkT8Qn237w
). • The exact DeleteRoom command/request you ran (redact keys/secrets). • Which SDK/method you used (Python, Node.js, REST, or gRPC). • The
LIVEKIT_URL
you targeted (you may redact hostname). • The full error response (HTTP status and message). Quick checklist to verify while you send that: • Room ID is exact (case-sensitive, no hidden whitespace). • You’re using admin credentials (
LIVEKIT_API_KEY
/
LIVEKIT_API_SECRET
) — client/browser tokens cannot delete rooms. • The request targets the same LiveKit deployment/URL shown in the UI. • Try listing rooms via RoomService with the same credentials to confirm API visibility. Send the requested details and I’ll provide the exact admin command/snippet for your environment and walk you through forcing deletion and stopping any egress/agent processes tied to those rooms. , with interactive elements