Hello. I have a free plan. I created api token. and I want to configure the inclusion and deactivation of the “under attack” mode through the api. api check request works, example:
curl -X GET “https…/client/v4/user/tokens/verify”
-H “Authorization: Bearer W7CrjBaJJLdktYTwgtKb3DhUUt1H874a”
and this query gives an error
curl -X PATCH “https…/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/security_level”
-H “X-Auth-Email: [email protected]”
-H “X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41”
-H “Content-Type: application/json”
–data ‘{“value”:“under_attack”}’
here’s an error:
{
“success”: false
“errors”: [{
“code”: 6003,
“message”: “Invalid request headers”,
“error_chain”: [{
“code”: 6103,
“message”: “Invalid format for X-Auth-Key header”
}]
}],
“messages”: ,
“result”: null
}
id zone and mail and api token invented here, everything was filled out correctly for me
api key created “Custom Token”
Zone.ZoneSettings.Read
Zone.ZoneSettings.Edit