Kenc.dk

Kenc.Cloudflare

Free and open implementation of the Cloudflare API prtocol v4 in C# .net core, allowing cross-platform automated interaction with Cloudflare.

Kencdk/Kenc.Cloudflare

Code Examples

var cloudflareClient = new CloudflareClientFactory(emailAdr, apiKey, new CloudflareRestClientFactory(httpClientFactory), CloudflareAPIEndpoint.V4Endpoint).Create();
var zone = await cloudflareClient.Zones.GetAsync("kenc.dk");
DNSRecord dnsRecord;
try
{
    dnsRecord = await cloudflareClient.ZoneDNSSettingsClient.CreateRecordAsync(zone.Id, "_dummyrecord", DNSRecordType.TXT, "TXT record entry value", 3600);
}
catch (CloudflareException exception) when (exception.Errors[0].Code == "81057")
{
    Program.LogLine("The DNS entry already exists.");
}

Blog posts tagged with Cloudflare

Introducing Kenc.ACMELib (Lets Encrypt client in .net)

Development

About a year ago I started using Lets Encrypt for my certificate needs for a variety of websites and online services I run, but being mostly Windows based, I lacked a great automation solution. In the beginning I tried various solutions, including solutions for automatic certificate renewal for A

Read on