Thanks for reaching out here @Annalisa. Were you able to make progress? This article in our Developer Docs has all of the details you need. We’ll get some other team members to take a closer look as well. Keep us posted!
Hello @Annalisa,
Do you have an example call that returned the error mentioned? Please make sure not to provide any keys just the parameters that were passed into the API call.
@sleep_and_retry
@limits(calls=config.MAX_CALL_LIMIT, period=config.TIME_PERIOD)
def privacy_api_call(user_ids, url=URL, cred=CREDENTIALS):
payload = json.dumps({
"user_ids": user_ids,
"ignore_invalid_id": "true",
"delete_from_org": "false",
"include_mapped_user_ids": "true",
"requester": "annalisa@.....net"
})
headers = {
'Authorization': f'Basic {cred}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
return response.json()
print(privacy_api_call(["5ef8ee857e74cd1b8525a2c4909884e1bfbef89ea9a8e3b5dc4ec404f07c0aaa"]))
Hi @Annalisa ,
Can you please PM me your email you use for Amplitude, the Org ID and the Project ID you are trying to query through the API? Can you also let me know which User IDs you had this issue with? Thank you.
Please let me know when you send the PM, thank you.
Kind Regards,
Denis
Thanks for jumping @Denis Holmes. Keep us posted here as you both work out a way forward.
Hi @Annalisa ! Was wondering if you saw my message above and if you can send me a PM with the details? Thank you!
Hi @Denis Holmes , I did reply to your PM, can you please check.
Best,
Annalisa
Hi @Annalisa I see in PM in Community. Can you send it again ? Perhaps it did not get through. I will send a message first.
I have replied again, please also check ticket https://help.amplitude.com/hc/en-us/requests/242165 which is where my request was handled.
In any case, I have fixed the problem. Long story short, I have found that I cannot return a `response.json()` from the call, but should always return a `response.text`.
HI @Annalisa ,
Thanks for your response and glad you solved it. Interesting, I do see your response on the ticket but never got notified. Regardless, glad you sorted it out!
Kind Regards,
Denis