Terminal API with Custom POS

I have tried everything to get this to work. I am attempting to pair my Square Terminal to my custom POS application. In this video: Sandbox 101: Getting Started with Terminal API - YouTube he calls the following cURL to get a response with a device code. He uses a cURL request to get a device code back but my application is in C#, is it possible to make a POST request in C#? In the API Explorer it gives some C# code snippet that seems to be incomplete, do I need an SDK or something for that to work (code snippet posted below)?

cURL:
curl https://connect.squareupsandbox.com/v2/devices/codes
-X POST
-H ‘Square-Version: 2021-05-13’
-H ‘Authorization: Bearer ACCESS TOKEN’
-H ‘Content-Type: application/json’
-d ‘{
“device_code”: {
“product_type”: “TERMINAL_API”
},
“idempotency_key”: “42219792-87e0-4d73-a24a-6e907530466c”
}’

C# code snippet from API Explorer:
var deviceCode = new DeviceCode.Builder(productType: “TERMINAL_API”)
.Build();

var body = new CreateDeviceCodeRequest.Builder(idempotencyKey: “42219792-87e0-4d73-a24a-6e907530466c”, deviceCode: deviceCode)
.Build();

try
{
var result = await client.DevicesApi.CreateDeviceCodeAsync(body: body);
}
catch (ApiException e)
{
Console.WriteLine(“Failed to make the request”);
Console.WriteLine($“Response Code: {e.ResponseCode}”);
Console.WriteLine($“Exception: {e.Message}”);
}

While using our SDK is recommended it isn’t required. Yes, the snippet does assume that you are using our .Net SDK.