My LiveKit Cloud interface is showing three rooms ...
# ask-ai
m
My LiveKit Cloud interface is showing three rooms from yesterday that are still active but they should have closed. When I run lk room list in the CLI there are no results. How can I close these rooms?
t
Thanks for reaching out, Ben. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To address the issue of rooms appearing active in the LiveKit Cloud interface but not in the CLI, you can try the following steps: 1. Using the CLI: Run the following command to forcefully delete the room: `lk room delete ROOM_NAME_OR_ID`Replace
ROOM_NAME_OR_ID
with the actual name or ID of the room as shown in the interface. 2. Using the Server API: If you have access to the API, you can delete the room programmatically. For example, in Go:
Copy code
_, _ = roomClient.DeleteRoom(context.Background(), &livekit.DeleteRoomRequest{
    Room: "myroom",
})
3. Using the Agent API: If you are using Python, you can use the following code snippet:
Copy code
from livekit import api

api_client = api.LiveKitAPI(
    os.getenv("LIVEKIT_URL"),
    os.getenv("LIVEKIT_API_KEY"),
    os.getenv("LIVEKIT_API_SECRET"),
)
await api_client.room.delete_room(api.DeleteRoomRequest(
    room="ROOM_NAME",
))
4. Check for Caching or Synchronization Issues: ◦ Ensure there are no caching issues or synchronization delays between the interface and CLI. ◦ Try refreshing the interface or waiting briefly to see if the state updates. If these steps do not resolve the issue, there may be a deeper state inconsistency between the interface and the backend. In that case, further investigation would be required. Sources: cmd/lk/replay.go | Managing rooms | LiveKit Docs | Agents telephony integration | LiveKit Docs | pkg/rtc/types/interfaces.go