This document explains how to use cPanel's API tokens.
docs.cpanel.net
as that covers creating a token, assigning permissions, and using the token with API calls. There is a Curl example provided at the bottom of the page as well, but I don't have any examples on my end for the C# language.
The first way is to use the cPanel API. To do this, you will need to send a POST request to the /login page of the cPanel server. The body of the request should contain the following JSON: