Delete users
Remove users permanently with delete() or deleteUser().
delete()- call on aUserobject (no ID needed)deleteUser()- call on aChatobject (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 theUserobject)1user.delete() async throws -
deleteUser()(on theChatobject)1chat.deleteUser(
2 id: String
3) async throws
Input
| Parameter | Required in delete() | Required in deleteUser() | Description |
|---|---|---|---|
idType: StringDefault: n/a | No | Yes | Unique 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