Created
January 18, 2019 09:56
-
-
Save litalhassine/22167a1f390b15a8d77d75de1fd59abc 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