On this page

Delete channels

Permanently remove a channel from App Context storage with Delete() or DeleteChannel().

Both methods produce the same result. Call Delete() on a Channel object or DeleteChannel() on the Chat object with the channel ID.

Soft delete deprecated

Soft deletion for channels has been deprecated. Delete() now always performs a hard delete. Use Delete() without any parameters to permanently remove a channel. The soft parameter and Restore() method are no longer available for channels.

Requires App Context

Enable App Context for your keyset in the Admin Portal.

Method signature

These methods take the following parameters:

  • Delete() (on the Channel object)

    1channel.Delete()
  • DeleteChannel() (on the Chat object)

    1chat.DeleteChannel(string channelId)

Input

ParameterRequired in Delete()Required in DeleteChannel()Description
channelId
Type: string
Default:
n/a
No
Yes
Unique channel identifier.

Output

TypeDescription
Task<ChatOperationResult>
Returned Task that you can await to get the result of the delete operation.

Sample code

Permanently delete the channel with the ID of support.

  • Delete() (on the Channel object)

    1
    
  • DeleteChannel() (on the Chat object)

    1
    
Last updated on