Delete users

Remove users permanently with delete() or deleteUser().

  • delete() - call on a User object (no ID needed)
  • deleteUser() - call on a Chat object (requires user ID)
Requires App Context

Enable App Context in the Admin Portal to store user data.

Method signature​

These methods take the following parameters:

  • delete() (on the User object)

    1user.delete() async throws
  • deleteUser() (on the Chat object)

    1chat.deleteUser(
    2 id: String
    3) async throws

Input​

ParameterRequired in delete()Required in deleteUser()Description
id
Type: String
Default:
n/a
NoYesUnique user identifier (up to 92 UTF-8 characters).

Output​

This method doesn't return any value.

Sample code​

Sample code

The code samples in Swift Chat SDK focus on asynchronous code execution.

You can also write synchronous code as the parameters are shared between the async and sync methods but we don't provide usage examples of such.

Permanently delete user support_agent_15.

  • delete()

    1
    
  • deleteUser()

    1
    

Was this page useful?

Last updated on