Skip to main content

Open channel auto-destroy mechanism

Open channels support flexible control over destruction conditions and time-to-live.

Auto-destroy behavior

Open channels have a built-in auto-destroy mechanism. If no auto-destroy type is configured at creation time and no type is set later via the API, the default behavior is destroy on inactivity. The open channel is destroyed after 1 hour of inactivity (no participant joins/leaves and no new messages), and all remaining participants are removed.

Once you configure the auto-destroy type via the API (either at creation or afterward), the API-level configuration takes precedence (including default values), and any App Key-level configuration is ignored.

Configure auto-destroy type

Set the auto-destroy type when creating an open channel using the destroyType parameter:

  • Destroy on inactivity — Use destroyTime to set the inactivity duration (in minutes) before auto-destroy. "Inactivity" means no participant joins or leaves and no new messages.
  • Destroy on schedule — Use destroyTime to set the time-to-live (in minutes) from the time of creation. Maximum: 10,080 minutes (7 days).

After creation, you can change the auto-destroy type using Set auto-destroy type.

When auto-destroy does not apply

  • Bound to a voice/video room — When an open channel is bound to a voice/video room, the server checks whether the bound room still exists before destroying. If the room still exists, the destruction is blocked. If the room has been destroyed, the open channel is destroyed.
  • Keep-alive enabled — A keep-alive open channel is never auto-destroyed. It can only be destroyed by calling the Destroy API.