title: 404 error while accessing youtube api data
body: <p>I developed one standalone program to find a video id based upon an assest id.  For this I used service account authentication to generate the access token.  When I passed the access token in my url..it showed 404 not found exception.  Has anybody faced a problem like this?</p>
  
  <p>code:</p>
  
  <pre><code>String EmailId = "xxxxxx@developer.gserviceaccount.com";
  
              //passing Scope
              @SuppressWarnings({ "unchecked", "rawtypes" })
                List&lt;String&gt;scops = new &lt;String&gt;ArrayList();
                scops.add("https://www.googleapis.com/auth/youtubepartner");
  
              final HttpTransport TRANSPORT = new NetHttpTransport();
              final JsonFactory JSON_FACTORY = new JacksonFactory();
  
           // Create a listener for automatic refresh OAuthAccessToken
              List&lt;CredentialRefreshListener&gt; list = new ArrayList&lt;CredentialRefreshListener&gt;();
              list.add(new CredentialRefreshListener() {
                  @Override
                  public void onTokenResponse(Credential credential,
                          TokenResponse tokenResponse) throws IOException {
                      System.out.println(tokenResponse.toPrettyString());
  
                  }
  
                  public void onTokenErrorResponse(Credential credential,
                          TokenErrorResponse tokenErrorResponse)
                          throws IOException {
                      System.err.println("Error: "
                              + tokenErrorResponse.toPrettyString());
                  }
  
  
              });
              GoogleCredential credential = new GoogleCredential.Builder()
              .setTransport(TRANSPORT)
              .setJsonFactory(JSON_FACTORY)
              .setServiceAccountId(EmailId)
              .setServiceAccountScopes(scops)
              .setServiceAccountPrivateKeyFromP12File(new File("xxxxxx.p12"))
              .setRefreshListeners(list)
              .build();
              /*YouTube youtube = new YouTube.Builder(TRANSPORT,
                      JSON_FACTORY, credential).setApplicationName("test1-bd3f7f252932").build();*/
              credential.refreshToken();
  </code></pre>
  
  <p>i got the "token" and now i passed access_token as a parameter in my actual youtube url to get video id: <code>https://www.googleapis.com/youtube/partner/v1/assetSearch?metadataSearchFields=customId%3Axxxxx&amp;access_token=ya29.9AD4t0HKE-ByFyeXhz7bO6Ha1Ej4ybzrMk2jjlUsvQdRAK-D6wrRr50Sn9KZ01YunTaPRDHpT4JEgQ</code></p>
  
  <p>while running this i got exception like :</p>
  
  <pre><code>{
   "error": {
    "errors": [
     {
      "domain": "global",
      "reason": "notFound",
      "message": "Not Found"
     }
    ],
    "code": 404,
    "message": "Not Found"
   }
  }
  </code></pre>
  
  <p>Thanks in advance!</p>