So you’re confused about the gandi.cli API keys?

Yeah, me too.

The Gandi cli looks great on paper, however, it’s a bit unfriendly to get running,

Here is the situation, as of September 2019:

  • you actually need two different API keys
  • the old V4 interface uses a XMLRPC API.
  • the new V5 interface uses a REST API

So you need to go to v4.gandi.net, log in with your handle, and in your account management go to the API management and (re)generate your (XMPRPC) API key.

Then you also need to go to gandi.net, log in with your username, and in your security settings (re)generate a (REST) API key.

Finally, when running `gandi setup` you will put the v4 key first and the v5 key last.

This will give you a config file $HOME/.config/gandi/config.yaml that will look something like this:

api:
host: https://rpc.gandi.net/xmlrpc/
key: ikaitooquu4ahfun5Gidaen
apirest:
key: ien5quun1Eezaer3iesh7ph

I get a “IOError: unsupported XML-RPC protocol” error when trying to use the gandi record command.

But using the gandi dns command works fine.

record is the command to manage old (v4) domains .

dns is the command to manage “LiveDNS” (v5) domains.

Leave a Reply

Your email address will not be published. Required fields are marked *