add_ddnsuser()

Create a dynamic DNS user.

All API functions DDNS Settings

Signature

add_ddnsuser(array $parameters): mixed

Parameters

Pass these parameters as KasRequestParams. Every request also requires kas_login, kas_auth_type, and kas_auth_data, as shown in SOAP with PHP.

Name Description Requirement
dyndns_comment The comment Required
dyndns_password The password Required
dyndns_zone The zone for which the DDNS user is created, e.g. example.com Required
dyndns_label The label, e.g. home Required
dyndns_target_ip The IP address the user initially points to Required
dyndns_dual_stack Dual stack mode Optional

PHP example

<?php

// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
    'dyndns_comment' => 'at home',
    'dyndns_password' => 'password',
    'dyndns_zone' => 'example.com',
    'dyndns_label' => 'home',
    'dyndns_target_ip' => '1.2.3.4',
];

try {
    $client = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
    $response = $client->KasApi(json_encode([
        'kas_login' => 'w0123456',
        'kas_auth_type' => 'session',
        'kas_auth_data' => $sessionToken,
        'kas_action' => 'add_ddnsuser',
        'KasRequestParams' => $parameters,
    ]));
    print_r($response);
} catch (SoapFault $fault) {
    echo 'Error: ' . $fault->faultstring;
}

Responses and error codes

  • TRUE the action was carried out
  • missing_parameter a required parameter is missing
  • dyndns_comment_syntax_incorrect
  • password_syntax_incorrect
  • dyndns_target_ip_syntax_incorrect
  • dyndns_label_not_allowed
  • ddns_limit_reached
  • dns_settings_not_allowed
  • settings_not_in_contract
  • record_name_syntax_incorrect