Forked from litalhassine/appsflyer_delete_gdpr_request.py
Created
November 13, 2019 08:08
-
-
Save frankiesimon/60655cf4b54492285cafe8e5f91d643a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import datetime | |
headers = { | |
"Content-Type": "application/json", | |
"Accept": "application/json" | |
} | |
params = { | |
"api_token": "TAKE ME FROM APPSFLYER" | |
} | |
import uuid | |
body = { | |
"subject_request_id": str(uuid.uuid4()), | |
"subject_request_type": "erasure", | |
"submitted_time": datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%SZ"), | |
"subject_identities": [ | |
{ "identity_type": "ios_advertising_id", | |
"identity_value": "APPSFLYER_ID_HERE", | |
"identity_format":"raw" | |
}], | |
"api_version":"0.1", | |
"property_id": "id1019442026" | |
} | |
body = json.dumps(body) | |
res = requests.request("POST", | |
"https://hq1.appsflyer.com/gdpr/opengdpr_requests", | |
headers=headers, data=body, params=params) | |
print(res.text) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment