After setting up a custom service for ddns updates (set service dns dynamic interface eth1 service custom etc...), logs showed that the authentication failed. After further investigation it appeared that the client was trying to update via dyndns servers and not the server name in the configuration - domains.google.com.
Inspecting the /etc/ddclient.conf file showed the configuration parameters:
DynDNS provider configuration for sub.domain.tld
protocol=dyndns2
max-interval=28d
login=login
password='password'
sub.domain.tld
ddclient.conf was missing the following line to tell it to reach out to google domains instead:
server=domains.google.com
After manually adding server=domains.google.com before the domain name in ddclient.conf, ddns updates work as expected.
I'm not much help on the coding side, but I'm happy to help however I can :-)