I follow the Cloudflare API v4 Documentation
headers = {
‘X-Auth-Email’: ‘[email protected]’,
‘X-Auth-Key’: ‘xxxx’,
‘Content-Type’: ‘application/json’,
}
data = ‘{“type”:“A”,“name”:“xxxx.com”,“content”:“%s”,“ttl”:15,“proxied”:false}’ % wan_ip
requests.put(‘https://api.cloudflare.com/client/v4/zones/88be5e09539a4caf91fa341bf034de16/dns_records/d718b4741e86988aa8ce91bc1f77ed55’, headers=headers, data=data)
ERROR MSG : Request failed with status code 400 Bad requiest.
This script is now unavailable, I don’t know what happened.