Skip to content

libdns/directadmin

Repository files navigation

DirectAdmin for libdns

Go Reference

This package implements the libdns interfaces for DirectAdmin, allowing you to manage DNS records.

Authenticating

This package supports API Login Keys for authentication.

To create a key select Login Keys from the top right dropdown menu:

Screenshot of login keys dropdown

From the Login Keys page select Create Key

Screenshot of login keys page with create key button

You will need to create a login key with the following settings:

  • Key Name
    • Select Descriptive Name
  • Expires On
    • You can set this to whatever you need, but "Never" is likely the best option
  • Clear Key
    • Unchecked
  • Allow HTM
    • Unchecked
  • Commands To Allow
    • CMD_API_SHOW_DOMAINS
    • CMD_API_DNS_CONTROL

The CMD_API_SHOW_DOMAINS permission is needed to get the zone ID, the CMD_API_DNS_CONTROL permission is obviously necessary to edit the DNS records.

If you're only using the GetRecords() method, you can remove the CMD_API_DNS_CONTROL permission to guarantee no changes will be made.

Screenshot of login key settings