public async Task <IActionResult> GetVideoAccessToken(string videoId, bool allowEdit = false)
        {
            AzureVideoIndexerHelper helper = new AzureVideoIndexerHelper(this.AzureConfiguration,
                                                                         this.CreateAuthorizedHttpClient());
            var videoAccesstoken = await helper.GetVideoAccessTokenStringAsync(videoId, allowEdit);

            return(Ok(videoAccesstoken));
        }
        public async Task <IActionResult> GetVideoThumbnail(string videoId, string thumbnailId)
        {
            AzureVideoIndexerHelper helper = new AzureVideoIndexerHelper(this.AzureConfiguration,
                                                                         this.CreateAuthorizedHttpClient());
            string videoAccessToken = await helper.GetVideoAccessTokenStringAsync(videoId, true);

            string format     = "Base64";
            string requestUrl = $"{this.AzureConfiguration.VideoIndexerConfiguration.BaseAPIUrl}" +
                                $"/{this.AzureConfiguration.VideoIndexerConfiguration.Location}" +
                                $"/Accounts/{this.AzureConfiguration.VideoIndexerConfiguration.AccountId}" +
                                $"/Videos/{videoId}" +
                                $"/Thumbnails/{thumbnailId}" +
                                $"?format={format}" +
                                $"&accessToken={videoAccessToken}";
            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key",
                                             this.AzureConfiguration.VideoIndexerConfiguration.SubscriptionKey);
            var result = await client.GetStringAsync(requestUrl);

            return(Ok(result));
        }