srvrco / getssl

obtain free SSL certificates from letsencrypt ACME server Suitable for automating the process on remote servers.
GNU General Public License v3.0
2.07k stars 372 forks source link

DNS script for Linode needs updating for V4 API #831

Closed softins closed 4 months ago

softins commented 6 months ago

Describe the bug The DNS scripts for Linode refer to https://api.linode.com/api/, but it appears Linode no longer support this version of API. Instead it is necessary to use https://api.linode.com/v4/ with different endpoints and parameters.

To Reproduce Steps to reproduce the behavior:

I manually created the first curl command issued by dns_add_linode and dns_del_linode:

export TOKEN=<my_token>
curl -X POST https://api.linode.com/api/ -H "Accept: application/json" -H "User-Agent: getssl/0.1" -H "application/x-www-form-urlencoded" -d "api_key=$TOKEN&api_action=domain.list"

The received output indicated 403 Forbidden

I then issued the corresponding command in the V4 API:

curl -H "Authorization: Bearer $TOKEN" https://api.linode.com/v4/domains

This time it gave the expected JSON output.

Operating system (please complete the following information):

Additional context The script will of course need more than just changing the api_url.