"Code" 1001 - "error": "method_not_allowed"

Hi,
I am running the same DDNS-script since 1-2 years whenever I switch on my server, to update my IP.
3 days ago it stopped working, and I receive the message:
Record update failed.
{

  • “code”: 1001,*
  • “error”: “method_not_allowed”*
    }

I am not aware of any change in the API, and surprisingly nobody else reports this issue.

Any idea how to resolve?

Hi,

I am having exactly the same problem. I have a script in python to update the DNS when the public IP changes. I did not change anything and started getting this error.

{‘code’: 1001, ‘error’: ‘method_not_allowed’}

I got it working using ddclient

I got the same error.

“code”: 1001, “error”: “method_not_allowed”

Any idea how to resolve without using ddclient?

Same issue here. I saw it occured in Jan and resolved. Don’t know why it happens again.

I solved it. In fact my script had a problem causing the request body was not correct. Suggest you guys to check the actual request sent to cloudflare to make sure it’s correctly formatted.

Can you post your script, or is it somewhere available on Github?
Thanks!

This is the script I’m using but of course I modified it with my specifics. You need to test it with your specifics step by step.

Thank you!
Will try tomorrow …

I am running the same PHP code, since 2 years.
But at 28/Apr/2020 I get the same error.

{“code”:1001,“error”:“method_not_allowed”}

And in the API Document, I can’t find error code : 1001
https://api.cloudflare.com/#dns-records-for-a-zone-export-dns-records

I solved it.
PHP code got error

$cf_api_baseurl=“https://api.cloudflare.com/client/v4/”;
$cf_fullurl=$cf_api_baseurl."/zones/".$zone_id."/dns_records";

PHP code can work

$cf_api_baseurl=“https://api.cloudflare.com/client/v4/”;
$cf_fullurl=$cf_api_baseurl.“zones/”.$zone_id."/dns_records";

Don’t know why the error code can work befor 28/Apr/2020

我找到了原因,在api返回的json中多了空格,导致之前的脚本无法正常解析,修改之后就可以正常更新了。
I found the reason, there are more spaces in the json returned by the API, which caused the previous script to fail to parse normally, and can be updated normally after modification

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.