special.php
You must provide ?lid=1234 as GET for each request, no matter what.
Even for POST values, the GET ?lid must always be present. These 'special' commands require that your account has access to these functions.
以下是我写的代码:
import requests
uid = "123456"
password = "123456"
def change_license_ip():
"修改授权ip"
url = "https://www.directadmin.com/clients/api/special.php?lid=12345&saveip=1&ip="
ip = input("请输入新的授权ip:")
r = requests.post(url + ip, auth=(uid, password)) # 用POST方式发送请求并获得响应
print(r.text)