When an end user initiates a personal data deletion request on the app, the app server calls this API to delete data from Analytics Kit.
As required by the GDPR, you may need to allow end users to delete their personal data by providing a button in your app. When a user taps this button, your app server calls this API to delete all personal data that has been collected and reported to the Analytics Kit server.
Protocol | HTTP POST |
|---|---|
Direction | Your callback API server -> Analytics Kit server |
URL | {rootUrl}/analytics/gdpr/user_deletion_requests/v2 NOTE: For details about {rootUrl}, please refer to API Access Address. |
Data Format | Request: Content-Type: application/json Response: Content-Type: application/json |
Request header
Parameter | Mandatory | Type | Description |
|---|---|---|---|
x-product-id | Yes | String | Product ID registered in AppGallery Connect. |
x-app-id | Yes | String | App ID registered in AppGallery Connect. |
Authorization | Yes | String | Authentication information. For details, please refer to OAuth 2.0-based Authentication. NOTE: A space character must be added between Bearer and the value of access_token. |
Request body
POST /analytics/gdpr/user_deletion_requests/v2 HTTP/1.1
Content-Type: application/json; charset=UTF-8
Content-Length: xxxx
Accept: application/json
Authorization: Bearer ***
x-product-id: sample-productid
x-app-id: sample-appid
{
"aaid":"sample-aaid"
} Assume that the status code is 200.
Response header
Parameter | Mandatory | Type | Description |
|---|---|---|---|
Content-Type | Yes | application/json | Response data format. |
Response body
Parameter | Mandatory | Type | Description |
|---|---|---|---|
result_code | Yes | String | Result code. For details, please refer to Result Codes. |
result_msg | Yes | String | Response description. |
Assume that the status code is 200.
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Connection: Close
Content-Length: xxxx
{
"result_code":"0",
"result_msg":"success"
} Status Code | Result Code | Description | Solution |
|---|---|---|---|
200 | 0 | Request successful. | - |
400 | 10020 | Invalid parameter. | Check and correct the parameter value. |
400 | 10032 | The data cannot be deleted because it is being exported. | Display a message indicating that the data is being exported and asking the user to try again after the data export is complete. |
400 | 10033 | The data has been deleted. | Display a message indicating that the data has been deleted. |
400 | 10008 | Requests are too frequent. | Display a message prompting the user to reduce the frequency of requesting data deletion and asking the user to try again later. |