2017-03-28 06:03:01 +08:00
---
name: Gandi
2017-10-11 20:33:17 +08:00
title: Gandi Provider
2017-03-28 06:03:01 +08:00
layout: default
jsId: GANDI
---
# Gandi Provider
2018-08-03 20:53:30 +08:00
There are two providers for Gandi:
1. `GANDI` uses the v3 API and is able to act as a registrar provider
and a DNS provider. It is not able to handle domains that have
migrated to the new LiveDNS API. You need to get the API key from
the [v4 interface][].
2. `GANDI-LIVEDNS` uses the LiveDNS API and is only able to act as a
DNS provider. You need to get the API key from the [v5 interface][].
[v4 interface]: https://v4.gandi.net
[v5 interface]: https://v5.gandi.net
2017-03-28 06:03:01 +08:00
## Configuration
2017-10-11 22:10:01 +08:00
In your credentials file you must provide your Gandi.net API key:
2017-03-28 06:03:01 +08:00
{% highlight json %}
{
2017-10-11 20:33:52 +08:00
"gandi": {
2017-03-28 06:03:01 +08:00
"apikey": "your-gandi-key"
}
}
{% endhighlight %}
## Metadata
2017-05-10 21:19:11 +08:00
This provider does not recognize any special metadata fields unique to Gandi.
2017-03-28 06:03:01 +08:00
## Usage
2017-10-11 22:10:01 +08:00
Example Javascript:
2017-03-28 06:03:01 +08:00
{% highlight js %}
var GANDI = NewDnsProvider("gandi", "GANDI");
2018-03-17 20:43:57 +08:00
var REG_GANDI = NewRegistrar("gandi", "GANDI");
2017-03-28 06:03:01 +08:00
2017-05-10 21:19:11 +08:00
D("example.tld", REG_GANDI, DnsProvider(GANDI),
2017-03-28 06:03:01 +08:00
A("test","1.2.3.4")
);
{% endhighlight %}
2017-05-03 21:32:47 +08:00
## New domains
2018-03-17 20:43:57 +08:00
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 control panel manually.