/api/2/deletions/users ignore_invalid_ids not working

I am running the following:


import requests
import json
from requests.auth import HTTPBasicAuth

url = ""

payload = json.dumps({
"user_ids": [
"this_one_exists", "does_not_exist"
"requester": "",
"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)



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: [%s], invalid user_ids: [%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!

0 replies

Be the first to reply!