C# Rest API Client sample code for login using HttpClient and IHttpClientFactory (prevent socket exhaustion) given login (post method) credentials (API key, username, password). Read JSON response (Token). Use Token to call Rest API methods to retrieve basic user account information.