public IActionResult getvideobyid(String videoId) { if (String.IsNullOrEmpty(videoId)) { ModelState.AddModelError("error", "Video Id required."); return(BadRequest(ModelState)); } var response = _iYoutubeService.GetVideoById(videoId, API_KEY); return(Ok(response)); }