title: How to get video status using YouTube Data API with C#
body: <p>I have tried code in 3 days for get video status info in my YouTube channel, but did not succeed.</p>
  <p>Below is the code I used, I can <code>writeln()</code> the title, id, description of the video, but cannot get the video status.</p>
  <pre class="lang-cs prettyprint-override"><code>private async Task Editvideo()
  {
      UserCredential credential;
      using (var stream = new FileStream(&quot;client_secrets.json&quot;, FileMode.Open, FileAccess.Read))
      {
          credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
              GoogleClientSecrets.Load(stream).Secrets,
              // This OAuth 2.0 access scope allows for read-only access to the authenticated 
              // user's account, but not other types of account access.
              new[] { YouTubeService.Scope.YoutubeReadonly },
              &quot;user&quot;,
              CancellationToken.None,
              new FileDataStore(this.GetType().ToString())
          );
      }
  
      var youtubeService = new YouTubeService(new BaseClientService.Initializer()
      {
          HttpClientInitializer = credential,
          ApplicationName = this.GetType().ToString()
      });
  
      var channelsListRequest = youtubeService.Channels.List(&quot;contentDetails&quot;);
      channelsListRequest.Mine = true;
  
      // Retrieve the contentDetails part of the channel resource for the authenticated user's channel.
      var channelsListResponse = await channelsListRequest.ExecuteAsync();
  
      foreach (var channel in channelsListResponse.Items)
      {
          // From the API response, extract the playlist ID that identifies the list
          // of videos uploaded to the authenticated user's channel.
          var uploadsListId = channel.ContentDetails.RelatedPlaylists.Uploads;
  
          Console.WriteLine(&quot;Videos in list {0}&quot;, uploadsListId);
  
          var nextPageToken = &quot;&quot;;
          while (nextPageToken != null)
          {
              var playlistItemsListRequest = youtubeService.PlaylistItems.List(&quot;snippet&quot;);
              playlistItemsListRequest.PlaylistId = uploadsListId;
              playlistItemsListRequest.MaxResults = 50;
              playlistItemsListRequest.PageToken = nextPageToken;
  
              
  
              // Retrieve the list of videos uploaded to the authenticated user's channel.
              var playlistItemsListResponse = await playlistItemsListRequest.ExecuteAsync();
              
  
              foreach (var playlistItem in playlistItemsListResponse.Items)
              {
                  // Print information about each video.
                  // playlistItem.Status = new PlaylistItemStatus();
                  // string videostatus = playlistItem.Status.PrivacyStatus;
                  // Console.WriteLine(videostatus);
                  Console.WriteLine(&quot;{0} ({1})&quot;, playlistItem.Snippet.Title, playlistItem.Snippet.ResourceId.VideoId);
              }
  
              nextPageToken = playlistItemsListResponse.NextPageToken;
          }
      }
  }
  </code></pre>