_err "Dynu client id and secret is not specified."
_err "Please create you API client id and secret and try again."
return1
fi
#save the client id and secret to the account conf file.
_saveaccountconf Dynu_ClientId "$Dynu_ClientId"
_saveaccountconf Dynu_Secret "$Dynu_Secret"
if[ -z "$Dynu_Token"];then
_info "Getting Dynu token"
if ! _dynu_authentication;then
_err "Can not get token."
fi
fi
_debug "Detect root zone"
if ! _get_root "$fulldomain";then
_err "Invalid domain"
return1
fi
_debug _node "$_node"
_debug _domain_name "$_domain_name"
_info "Creating TXT record"
if ! _dynu_rest POST "dns/record/add""{\"domain_name\":\"$_domain_name\",\"node_name\":\"$_node\",\"record_type\":\"TXT\",\"text_data\":\"$txtvalue\",\"state\":true,\"ttl\":90}";then