Always shows an context type error when using API

The error:
{"result":null,"success":false,"errors":[{"code":9207,"message":"Failed to parse request body, content-type must be application/json"}],"messages":[]}

My shell script:

ipadr=`ip -4 addr show wlan0 | grep inet | awk '{print $2}' | awk -F "/" '{print $1}'`
curl -X PUT "https://api.cloudflare.com/client/v4/zones/91834b073e2dd0e99847d7ba104db000/dns_records/aa636264d40be954453d8c3e31212272" -H "X-Auth-Email:email" -H "Authorization: Bearer key" -H "Content-Type: application/json" --data '{"type":"A","name":"domain","content":'"${ipadr}"',"ttl":1,"proxied":true}'

With tokens you don’t need X-Auth-Email. Also, double check the JSON, you most likely generate invalid data here.

Oh, wait i solved it myself thanks for help.

No worries :slight_smile: