/// <summary> /// Retrievs a token from the token endpoint, which is passed along to any subsequent call. Don't reuse the token across multiple runs of /// your program as they expire. /// </summary> /// <param name="config"></param> /// <returns></returns> public async Task <ApiResponse> GetTokenAsync(Configuration config = null) { Trace.WriteLine($"Starting {MethodBase.GetCurrentMethod().Name}"); ITokenApi api = new TokenApi(config); var result = await api.ApiTokenGetAsync(); Trace.WriteLine($"Ending {MethodBase.GetCurrentMethod().Name}"); return(result); }