Soft delete a user
Soft delete a user from the Nexconn messaging service. After soft deletion, all personal data stored in the messaging service is permanently removed and cannot be recovered. Use with caution.
Use cases
- User account deletion: Implement app account deletion. After successful deletion, the user is immediately logged out and cannot log in again. All related data is deleted permanently.
- Employee offboarding: Implement account removal for departing employees. After deletion, the employee can no longer log in, and account data is transferred or deleted.
Data cleanup scope
Nexconn only deletes personal data stored in the messaging service for the soft-deleted user:
- Personal info: User avatar and name stored in the messaging service
- Message data: Message history, offline messages, compensatory messages, offline message duration settings
- Channel info: Channels, channel lists, channel tags, channel settings (pinned, DND)
- Push info: Push is disabled; device push information is deleted
- User settings: Direct channel blocklist, push language preferences, push detail display settings
Nexconn does not delete non-personal data such as group channel and community channel memberships.
Soft deletion does not remove group channel or community channel memberships. If your app requires this, call the relevant Server APIs to remove the user from groups and community channels.
Effects
After soft deletion:
- Client: All IM connections are immediately terminated. If the user is online on multiple devices, all are disconnected. The user can no longer obtain access tokens or send/receive messages via SDK.
- Client: The SDK connection status listener returns a disconnection status code.
- Server: When sending messages via Server API, Nexconn does not check whether the sender's user ID has been soft-deleted. Your app must handle this.
- Server callback: If Subscribe to user online status is enabled, the server sends an online status change (user logged out) after the client disconnects.
If User soft deletion/restoration status callback is enabled, the server syncs the completion status to your designated server.
Request method
POST: https://Base URL/v4/user/soft-delete
Signature required: All server API requests require signature verification. See API request signature.
Rate limit: 100 users per second
Request body
The request body is in application/json format and supports the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
userIds | String[] | Yes | User IDs to soft delete. Maximum 100 per request. |
Request example
POST /v4/user/soft-delete HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"userIds": ["uid1", "uid2"]
}
Response
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. Individual results are delivered via the User soft deletion/restoration status callback. |
result.operationId | String | Operation ID. Unique identifier for this operation. Included in the callback request body when the callback is enabled. |
Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"code":0,"result":{"operationId":"C70B-B1D6-82E7-5SBO"}}