Delete User API
อัพเดทล่าสุด :2024-07-10
Prerequisite
Once a user is deleted, it cannot be restored. Deleted users can only receive messages again in the following scenarios:
- Web: Clear browser cookies and then return to your website.
- Mobile: Open the app again or uninstall and reinstall the app to reinitialize the SDK. It is recommended to update to the latest version of the SDK in your app.
Recommendations Before Deletion
Query Tag and Alias Information: Use the tag alias API to query the aliases and tags currently bound to the registration_id to be deleted.
Check Audience: Carefully check the audience to be deleted.
❗️Warning: Do not delete all users. Be very careful when performing these steps to ensure that not all users are deleted.
Delete User API Description
This API is used to delete an existing user (registration_id). It will delete all related data, bound tags, aliases, device information, and timezone information. This deletion is performed asynchronously.
Endpoint
DELETE /v4/devices/{registration_id}
DELETE /v4/devices/{registration_id}
โค้ดนี้โชว์เป็นหน้าต่างลอย
Request Header
DELETE /v4/devices/{registration_id}
Authorization: Basic (base64 auth string)
Accept: application/json
DELETE /v4/devices/{registration_id}
Authorization: Basic (base64 auth string)
Accept: application/json
โค้ดนี้โชว์เป็นหน้าต่างลอย
Request Parameters
Name | Required | Description |
---|---|---|
Registration ID | Yes | The unique identifier of the device in the engagelab system. Batch deletion is not supported. |
Request Example
DELETE /v4/devices/abc123
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
Accept: application/json
DELETE /v4/devices/abc123
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
Accept: application/json
โค้ดนี้โชว์เป็นหน้าต่างลอย
Response Example
Successful Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"success": true
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"success": true
}
โค้ดนี้โชว์เป็นหน้าต่างลอย
Error Response
{
"error":{
"code":27002,
"message":"unknown error"
}
}
{
"error":{
"code":27002,
"message":"unknown error"
}
}
โค้ดนี้โชว์เป็นหน้าต่างลอย