Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第一次使用(未生成文件时),API KEY错误情况下,运行不产生报错 #12

Open
syunaht opened this issue Jun 30, 2020 · 1 comment

Comments

@syunaht
Copy link

syunaht commented Jun 30, 2020

首先感谢大大精简好用的代码,在config填写正确的情况下没有问题,可以正常使用。
出于好奇自己研究了下
在API错误情况下打印:
No file, need IP
Updating zone_identifier & record_identifier
测试了下
大概出现在这个位置

CFZONE_ID=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones?name=$CFZONE_NAME" -H "X-Auth-Email: $CFUSER" -H "X-Auth-Key: $CFKEY" -H "Content-Type: application/json" | grep -Po '(?<="id":")[^"]*' | head -1 )

因为API错误的原因导致文件直接退出没有继续执行后文的错误检测代码

修不来……我爬了

@syunaht
Copy link
Author

syunaht commented Jun 30, 2020

顺便想请教一个疑惑多年的疑问
如果不使用Global API Key
而使用Global API Key上方那个API Tokens
该给予那些权限能够正常使用此类脚本呢?还是说没法?
反复给权限测试多次似乎都不太行……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant