请求参数 | 参数类型 | 是否必需 | 参数说明 |
---|---|---|---|
api_auth_key | String | 是 | 授权密钥 |
import requests
req_type = "query_auth"
headers = {
"User-Agent": "ApiWebServerUser",
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=UTF-8",
}
api_url = "https://api.addcoder.com/" + req_type
req_params = {"api_auth_key": "601137664d318ffde7c095381db55434"}
response = requests.get(
api_url,
headers=headers,
params=req_params,
timeout=20,
)
print(response.text)