github.com/teknogeek/dnscontrol/v2@v2.10.1-0.20200227202244-ae299b55ba42/docs/_providers/gandi_v5.md (about)

     1  ---
     2  name: Gandi_v5
     3  title: Gandi_v5 Provider
     4  layout: default
     5  jsId: GANDI
     6  ---
     7  # Gandi_v5 Provider
     8  
     9  `GANDI_V5` uses the v5 API and can act as a registrar provider
    10      or a DNS provider. It is only able to work with domains
    11      migrated to the new LiveDNS API, which should be all domains.
    12      API keys are assigned to particular users.  Go to User Settings,
    13      "Manage the user account and security settings", the "Security"
    14      tab, then regenerate the "Production API key".
    15  
    16  * API Documentation: https://api.gandi.net/docs
    17  * API Endpoint: https://api.gandi.net/
    18  
    19  ## Configuration
    20  In your credentials file you must provide your Gandi.net API key.
    21  The [sharing_id](https://api.gandi.net/docs/reference/) is optional.
    22  
    23  {% highlight json %}
    24  {
    25    "gandi_v5": {
    26      "apikey": "your-gandi-key",
    27      "sharing_id": "your-sharing_id"
    28    }
    29  }
    30  {% endhighlight %}
    31  
    32  ## Metadata
    33  This provider does not recognize any special metadata fields unique to Gandi.
    34  
    35  ## Usage
    36  Example Javascript:
    37  
    38  {% highlight js %}
    39  var GANDI = NewDnsProvider("gandi", "GANDI_V5");
    40  var REG_GANDI = NewRegistrar("gandi", "GANDI_V5");
    41  
    42  D("example.tld", REG_GANDI, DnsProvider(GANDI),
    43      A("test","1.2.3.4")
    44  );
    45  {% endhighlight %}
    46  
    47  If you are converting from the old "GANDI" provider, simply
    48  change "gandi" to "gandi_v5" in `creds.json`, and change "GANDI"
    49  to "GANDI_V5" in `dnsconfig.js`.  Be sure to test with
    50  `dnscontrol preview` before running `dnscontrol push`
    51  
    52  ## New domains
    53  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.
    54  
    55  
    56  ## Common errors
    57  
    58  This is the error you'll see if your API key is invalid.
    59  
    60  ```
    61  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
    62  ```