#Is it possible to update TXT records between quotation marks?
20 messages · Page 1 of 1 (latest)
????
anyone know how to do?
You can just ignore the warning, there's nothing wrong.
I mean yeah but is there a way to make it with quotes just so it doesn't give the damn warning?
Sure, just add the (escaped) quotes to your script
I've tried it doesn't seem to work
let me try, one second
I can send you the script i got
Just works for me
"content": "\"hallo\""
This has the warning, the above does not:
"content": "hallo"
i got this part:
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
--data "{\"type\":\"$type\",\"name\":\"$name\",\"content\":\"\"$content\",\"ttl\":1,\"proxied\":false}")
if [[ "$update_response" == *"\"success\":true"* ]]; then
echo "$name updated successfully."
else
echo "Error updating $name. Response: $update_response"
fi
fi
}```
don't seem to find what may be wrong
Why do you escape every quote?
it gave issues so i found a workaround
curl https://api.cloudflare.com/client/v4/zones/blablabla/dns_records -X POST -H "X-Auth-Key: blablabla" -H "X-Auth-Email: blablabla" -d '{"name": "txt.laudian.de", "type": "TXT", "content": "hallo"}'
curl https://api.cloudflare.com/client/v4/zones/blablabla/dns_records -X POST -H "X-Auth-Key: blablabla" -H "X-Auth-Email: blablabla" -d '{"name": "txt.laudian.de", "type": "TXT", "content": "\"hallo\""}'
With escaped quotes so the warning is gone
ok yeah it works