github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/provider/gandi_v5.md (about)

     1  `GANDI_V5` uses the v5 API and can act as a registrar provider
     2  or a DNS provider. It is only able to work with domains
     3  migrated to the new LiveDNS API, which should be all domains.
     4  API keys are assigned to particular users.  Go to User Settings,
     5  "Manage the user account and security settings", the "Security"
     6  tab, then regenerate the "Production API key".
     7  
     8  * API Documentation: https://api.gandi.net/docs
     9  * API Endpoint: https://api.gandi.net/
    10  
    11  ## Configuration
    12  
    13  To use this provider, add an entry to `creds.json` with `TYPE` set to `GANDI_V5`
    14  along your Gandi.net API key. The [sharing_id](https://api.gandi.net/docs/reference/) is optional.
    15  
    16  The `sharing_id` selects between different organizations which your account is
    17  a member of; to manage domains in multiple organizations, you can use multiple
    18  `creds.json` entries.
    19  
    20  How to find the `sharing_id`: The sharing ID is the second hex string found in
    21  the URL on the portal. Log into the Gandi website, click on "organizations" in
    22  the leftnav, and click on the organization name.  The URL will be something
    23  like:
    24  
    25  ```text
    26  https://admin.gandi.net/organizations/[not this hex string]/PLTS/[sharing id]/profile
    27  ```
    28  
    29  Example:
    30  
    31  {% code title="creds.json" %}
    32  ```json
    33  {
    34    "gandi": {
    35      "TYPE": "GANDI_V5",
    36      "apikey": "your-gandi-key",
    37      "sharing_id": "your-sharing_id"
    38    }
    39  }
    40  ```
    41  {% endcode %}
    42  
    43  ## Metadata
    44  This provider does not recognize any special metadata fields unique to Gandi.
    45  
    46  ## Limitations
    47  This provider does not support using `ALIAS` in combination with DNSSEC,
    48  whether `AUTODNSSEC` or otherwise.
    49  
    50  This provider only supports `ALIAS` on the `"@"` zone apex, not on any other
    51  names.
    52  
    53  ## Usage
    54  An example configuration:
    55  
    56  {% code title="dnsconfig.js" %}
    57  ```javascript
    58  var REG_GANDI = NewRegistrar("gandi");
    59  var DSP_GANDI = NewDnsProvider("gandi");
    60  
    61  D("example.com", REG_GANDI, DnsProvider(DSP_GANDI),
    62      A("test", "1.2.3.4"),
    63  END);
    64  ```
    65  {% endcode %}
    66  
    67  If you are converting from the old "GANDI" provider,
    68  simply change "GANDI" to "GANDI_V5" in `dnsconfig.js`.
    69  Be sure to test with `dnscontrol preview` before running `dnscontrol push`.
    70  
    71  ## New domains
    72  If a domain does not exist in your Gandi account, DNSControl will *not* automatically add it with the `create-domains` command. You'll need to do that via the web UI manually.
    73  
    74  
    75  ## Common errors
    76  
    77  #### Error getting corrections
    78  
    79  ```text
    80  Error getting corrections: 401: The server could not verify that you authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad api key), or your access token has expired
    81  ```
    82  
    83  This is the error you'll see if your `apikey` in `creds.json` is wrong or invalid.
    84  
    85  #### Domain does not exist in profile
    86  
    87  ```text
    88  WARNING: Domain 'example.com' does not exist in the 'secname' profile and will be added automatically.
    89  ```
    90  
    91  This error is caused by the internal `ListZones()` functions returning no domain names.  This is usually because your `creds.json` information is pointing at an empty organization or no organization.  The solution is to set
    92  `sharing_id` in `creds.json`.
    93  
    94  #### get-zones "nameonly" returns nothing
    95  
    96  If a `dnscontrol get-zones --format=nameonly CredId - all` returns nothing,
    97  this is usually because your `creds.json`  information is pointing at an empty
    98  organization or no organization.  The solution is to set `sharing_id` in
    99  `creds.json`.