在使用Cloudflare时,我多次收到一个与这 (而不是我)类似的身份验证错误。
curl -X GET "https://api.cloudflare.com/client/v4/zones/<ZONEID>/dns_records?type=A&name=<DOMAIN>&content=127.0.0.1&proxied=undefined&page=1&per_page=20&order=type&direction=desc&match=all" \
-H "X-Auth-Email: <EMAIL>" \
-H "X-Auth-Key: <APITOKEN>" \
-H "Content-Type: application/json"
{“success”:false,“errors”:[{“code”:10000,“message”:“Authentication error”}]}
我做错了什么?
发布于 2022-05-12 16:24:05
显然,唯一可行的方法是使用用户令牌而不是区域1。
curl -XPOST -H 'X-Auth-Key:
TOKEN' -H 'X-auth-email:
EMAIL' -H \"Content-type: application/json\" -d '{\"type\":\"CNAME\",\"name\":\"hi\",\"content\":\"example.com\",\"proxied\":true}' 'https://api.cloudflare.com/client/v4/
ZONE_ID/dns_records'
https://stackoverflow.com/questions/71624819
复制相似问题