[PR #568] Gandi Personal Access Token support #736

Closed
opened 2025-11-20 04:25:53 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/qdm12/ddns-updater/pull/568

State: closed
Merged: Yes


Currently authentication for updates to Gandi domains can only be done with the Gandi API key. Gandi has depreciated the API key in favor of Personal Access Tokens.

This PR adds the option to authenticate using a Personal Access Tokens but does not require a token to be used instead of an API key. This should not break anyone's current configurations or require updates to their configuration files. This implementation produces a KeyNotSet error only if both the API Key and Personal Access Token are not provided or are empty the config file. If both an API key and Personal Access Token are provided, it will default to using the Token for authentication. It does not use the API key as a fall back (i.e. if authentication via Token fails, try again with the API key), but this could be implemented in the future if desired.

Example config.json with different possible valid configurations:

{
    "settings": [
        {
            "provider": "gandi",
            "domain": "mydomain.com",
            "host": "@",
            "key": "mysecretkey",
            "ip_version": "ipv4"
        },
        {
            "provider": "gandi",
            "domain": "mydomain.com",
            "host": "@",
            "token": "mypersonalaccesstoken",
            "ip_version": "ipv4"
        },
        {
            "provider": "gandi",
            "domain": "mydomain.com",
            "host": "@",
            "key": "mysecretkey",
            "token": "mypersonalaccesstoken",
            "ip_version": "ipv4"
        }
    ]
}
**Original Pull Request:** https://github.com/qdm12/ddns-updater/pull/568 **State:** closed **Merged:** Yes --- Currently authentication for updates to Gandi domains can only be done with the Gandi API key. [Gandi has depreciated the API key in favor of Personal Access Tokens. ](https://api.gandi.net/docs/authentication/) This PR adds the option to authenticate using a Personal Access Tokens but does not require a token to be used instead of an API key. This should not break anyone's current configurations or require updates to their configuration files. This implementation produces a KeyNotSet error only if both the API Key and Personal Access Token are not provided or are empty the config file. If both an API key and Personal Access Token are provided, it will default to using the Token for authentication. It does not use the API key as a fall back (i.e. if authentication via Token fails, try again with the API key), but this could be implemented in the future if desired. Example config.json with different possible valid configurations: ``` { "settings": [ { "provider": "gandi", "domain": "mydomain.com", "host": "@", "key": "mysecretkey", "ip_version": "ipv4" }, { "provider": "gandi", "domain": "mydomain.com", "host": "@", "token": "mypersonalaccesstoken", "ip_version": "ipv4" }, { "provider": "gandi", "domain": "mydomain.com", "host": "@", "key": "mysecretkey", "token": "mypersonalaccesstoken", "ip_version": "ipv4" } ] } ```
saavagebueno added the pull-request label 2025-11-20 04:25:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#736