Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save frankiesimon/60655cf4b54492285cafe8e5f91d643a to your computer and use it in GitHub Desktop.
Save frankiesimon/60655cf4b54492285cafe8e5f91d643a to your computer and use it in GitHub Desktop.
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