Cloudflare api code:9106 error

{"success":false,"errors":[{"code":9106,"message":"Missing X-Auth-Key, X-Auth-Email or Authorization headers"}]}

I’ve been angry with this problem for a week, and no matter how accurate information is entered, an error occurs. The server is creating a web using Python in aws. I’m asking for advice, as it’s not a problem I can solve alone. I want to know if my python code is wrong.

                            api_key = ""
                            email = ""
                            zone_id = ""

                            headers = {"X-Auth-Email" : email, "X-Auth-Key" : api_key}
                            json_data = {"type" : "A", "name" : request.form["url"], "content" : "ip", "ttl" : 1, "proxied" : True}
                                res_data ="{zone_id}/dns_records", headers=headers, json=json_data).json()
                            return "ok"

2 posts were merged into an existing topic: X-auth-email