Hi, I had similar issues, just 2 different findings:
I need to disable HTTPS ("Use HTTP Secure" option in web panel) in the settings, as it was causing this error "curl: (77) error setting certificate verify locations: CAfile: /etc/cacert.pem CApath: none". Once disabled then the script go further...
And stuck on "code":6103,"message":"Invalid format for X-Auth-Key header" similar as ebreton. I've check the token a few times and all was ok, but could not authenticate successfully... Then I found this https://community.cloudflare.com/t/what-is-x-auth-key/203765. I've changed the script to provide "Authorization: Bearer" instead, with API token and it finally worked:). You would need to modify script /usr/lib/ddns/update_cloudflare_com_v4.sh and comment 1 line and add 1 new as below.
#__PRGBASE="$__PRGBASE --header 'X-Auth-Key: $password' "
__PRGBASE="$__PRGBASE --header 'Authorization: Bearer $password' "
Hope this helps with troubleshooting.