title: YouTube API v3 throws "No filter selected" error trying to list my subscriptions
body: <p>I'm trying to retrieve a list containing all my <strong><a href="https://www.youtube.com/subscription_manager" rel="nofollow noreferrer">subscriptions</a></strong>, however, I'm getting an exception with this error message when calling <code>Await listRequest.ExecuteAsync()</code> in the source-code below:</p>
  
  <blockquote>
    <p>Google.Apis.Requests.RequestError No filter selected. Expected one of:
    mySubscribers, id, mine, myRecentSubscribers, channelId [400] Errors [
     Message[No filter selected. Expected one of: mySubscribers, id, mine,
    myRecentSubscribers, channelId] Location[ - parameter]
    Reason[missingRequiredParameter] Domain[youtube.parameter] ]</p>
  </blockquote>
  
  <p>I read this, but I don't understand it at all:</p>
  
  <ul>
  <li><strong><a href="https://stackoverflow.com/questions/16735327/youtube-api-v3-apiclient-errors-httperror-no-filter-selected-where-do-i-sel">YouTube API v3 apiclient.errors.HttpError &quot;No filter selected.&quot; - where do I select a filter?</a></strong></li>
  </ul>
  
  <p>And the official reference:</p>
  
  <ul>
  <li><strong><a href="https://developers.google.com/youtube/v3/docs/subscriptions/list#solicitud-http" rel="nofollow noreferrer">Subscriptions: list</a></strong></li>
  </ul>
  
  <hr>
  
  <p>I'm using the <code>YouTubeService.Scope.Youtube</code> scope (<a href="https://www.googleapis.com/auth/youtube" rel="nofollow noreferrer">https://www.googleapis.com/auth/youtube</a>)</p>
  
  <p>I'm using the "<code>snippet</code>" list selector to try list my subscriptions, I tried also with "<code>id,snippet,contentDetails</code>" joined.</p>
  
  <p>And the autogenerated <strong>client_secrets.json</strong> file that I'm using to authenticate, has this content:</p>
  
  <pre><code>{
     "installed":{
        "client_id":"xxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
        "project_id":"xxxxxxxxxxxxxxxxxxx",
        "auth_uri":"https://accounts.google.com/o/oauth2/auth",
        "token_uri":"https://accounts.google.com/o/oauth2/token",
        "auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
        "client_secret":"xxxxxxxxxxxxxxxxx",
        "redirect_uris":[
           "urn:ietf:wg:oauth:2.0:oob",
           "http://localhost"
        ]
     }
  }
  </code></pre>
  
  <hr>
  
  <p>I'm doing something wrong with the information provided above?, and, how I could fix this issue?.</p>
  
  <p>Here is the relevant source-code:</p>
  
  <p>Note that if I set the property <code>listRequest.Mine</code> to <code>True</code>, then it doesn't throws the exception, but then it finds Zero subscriptions.</p>
  
  <p>C# (online translation):</p>
  
  <pre><code>public Task&lt;List&lt;Subscription&gt;&gt; GetSubscriptions(SubscriptionsResource.ListRequest.OrderEnum resultSorting)
  {
  
     if (!(this.isAuthorizedB)) {
        throw new InvalidOperationException(this.authExceptionMessage);
  
     } else {
        SubscriptionsResource.ListRequest listRequest = Await this.client.Subscriptions.List("snippet");
        // listRequest.MySubscribers = False
        // listRequest.Mine = False
        listRequest.MaxResults = 50;
        listRequest.Order = resultSorting;
  
        SubscriptionListResponse searchResponse = Await listRequest.ExecuteAsync();
  
        List&lt;Subscription&gt; subscriptions = new List&lt;Subscription&gt;();
  
        while (true) {
           foreach (Subscription searchResult in searchResponse.Items) {
              subscriptions.Add(searchResult);
           }
  
           if (!string.IsNullOrEmpty(searchResponse.NextPageToken)) {
              listRequest.PageToken = searchResponse.NextPageToken;
              searchResponse = listRequest.ExecuteAsync();
           } else {
              break; // TODO: might not be correct. Was : Exit Do
           }
  
        }
  
        return subscriptions;
  
     }
  
  }
  </code></pre>
  
  <p>VB.NET (original):</p>
  
  <pre><code>Public Async Function GetSubscriptions(ByVal resultSorting As SubscriptionsResource.ListRequest.OrderEnum) As Task(Of List(Of Subscription))
  
      If Not (Me.isAuthorizedB) Then
          Throw New InvalidOperationException(Me.authExceptionMessage)
  
      Else
          Dim listRequest As SubscriptionsResource.ListRequest = Me.client.Subscriptions.List("snippet")
          With listRequest
              ' .MySubscribers = False
              ' .Mine = False
              .MaxResults = 50
              .Order = resultSorting
          End With
  
          Dim searchResponse As SubscriptionListResponse = Await listRequest.ExecuteAsync()
  
          Dim subscriptions As New List(Of Subscription)
          Do While True
  
              For Each searchResult As Subscription In searchResponse.Items
                  subscriptions.Add(searchResult)
              Next searchResult
  
              If Not String.IsNullOrEmpty(searchResponse.NextPageToken) Then
                  listRequest.PageToken = searchResponse.NextPageToken
                  searchResponse = Await listRequest.ExecuteAsync()
              Else
                  Exit Do
              End If
  
          Loop
  
          Return subscriptions
  
      End If
  
  End Function
  </code></pre>