gandi: Changed authorization to personal access token

The previous API key mechanism has been deprecated.
See https://github.com/ddclient/ddclient/issues/602 for more.
This commit is contained in:
Lenard Hess 2024-02-04 10:40:05 +01:00
parent 5b104ad116
commit a57cb3b9ff
2 changed files with 6 additions and 7 deletions

View file

@ -199,7 +199,7 @@ ssl=yes # use ssl-support. Works with
## Single host update ## Single host update
# protocol=gandi # protocol=gandi
# zone=example.com # zone=example.com
# password=my-gandi-api-key # password=my-gandi-access-token
# ttl=10800 # optional # ttl=10800 # optional
# myhost.example.com # myhost.example.com

View file

@ -7451,9 +7451,8 @@ Description of Gandi's LiveDNS API can be found at:
https://api.gandi.net/docs/livedns/ https://api.gandi.net/docs/livedns/
Available configuration variables: Available configuration variables:
* password: The Gandi API key. If you dont have one yet, you can generate * password: The Gandi access token. If you dont have one yet, you can generate
your production API key from the API Key Page (in the Security section). your production access token from the Gandi Admin application. Required.
Required.
* zone: The DNS zone to be updated. Required. * zone: The DNS zone to be updated. Required.
* ttl: The time-to-live value associated with the updated DNS record. * ttl: The time-to-live value associated with the updated DNS record.
Optional; uses Gandi's default (10800) if unset. Optional; uses Gandi's default (10800) if unset.
@ -7462,13 +7461,13 @@ Example ${program}.conf file entries:
## Single host update. ## Single host update.
protocol=gandi protocol=gandi
zone=example.com zone=example.com
password=my-gandi-api-key password=my-gandi-access-token
host.example.com host.example.com
## Multiple host update. ## Multiple host update.
protocol=gandi protocol=gandi
zone=example.com zone=example.com
password=my-gandi-api-key password=my-gandi-access-token
ttl=3600 # optional ttl=3600 # optional
hosta.example.com,hostb.sub.example.com hosta.example.com,hostb.sub.example.com
EoEXAMPLE EoEXAMPLE
@ -7492,7 +7491,7 @@ sub nic_gandi_update {
my $headers; my $headers;
$headers = "Content-Type: application/json\n"; $headers = "Content-Type: application/json\n";
$headers .= "Authorization: Apikey $config{$h}{'password'}\n"; $headers .= "Authorization: Bearer $config{$h}{'password'}\n";