I am running the following:
import requests
import json
from requests.auth import HTTPBasicAuth
url = "https://amplitude.com/api/2/deletions/users"
payload = json.dumps({
"user_ids":
"this_one_exists", "does_not_exist"
],
"requester": "test@gmail.com",
"ignore_invalid_ids": True,
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
auth = HTTPBasicAuth('API_KEY', 'SECRET_KEY')
response = requests.request("POST", url, headers=headers, data=payload, auth=auth)
print(response.text)
Notice that in user IDs, one value does exist on Amplitude, and the other doesn’t. I get the following response:
{'error': {'http_code': 400,
'type': 'invalid',
'message': 'Invalid definition',
'metadata': {'details': 'invalid amplitude_ids and/or user_ids given for app %s]. invalid amplitude ids: i%s], invalid user_ids: i%s]'}}}
My understanding is that the first should be added to the batch queue, and the second should be reported as an invalid ID. Am I doing something wrong here? Thank you!