title: Exception 'Google_Service_Exception' with message 'Not Found' in (...) REST.php:118 Stack trace: #0
body: <p>I am working with the Google Tag Manager API to retrieve accounts and containers with a Service Account and my project is hosted on Google App Engine.</p>
  
  <p>This works for retrieving ALL accounts that user has access to, like this:</p>
  
  <pre><code> $client = new Google_Client();
      $client-&gt;useApplicationDefaultCredentials();
      $client-&gt;setApplicationName("gtmdocx");
  
  
      $client-&gt;setScopes(['https://www.googleapis.com/auth/tagmanager.readonly',
                          'https://www.googleapis.com/auth/tagmanager.manage.accounts',
                          'https://www.googleapis.com/auth/tagmanager.edit.containers']);
  
      $service = new Google_Service_TagManager($client);
      $results = $service-&gt;accounts-&gt;listAccounts();
  
  
      $jsonp = json_encode($results);
      echo $_GET['callback'] . '('.json_encode($jsonp).')';
  </code></pre>
  
  <p>This gives me results.</p>
  
  <p>But, when it comes to listing containers I get this error:</p>
  
  <blockquote>
    <p>Type: Google_Service_Exception Code: 404 Message: Not Found File:
    /base/data/home/apps/h~gtmdocx/20170908t154630.403962727349911910/vendor/google/apiclient/src/Google/Http/REST.php Line: 118</p>
  </blockquote>
  
  <p>There is so little documentation on PHP part of Google Tag Manager API, I've tried searching with no luck.</p>
  
  <p>This is my "List containers" code, everything is just like the first code with retrieving Accounts that is working but this is the code for Containers:</p>
  
  <pre><code> $client-&gt;setScopes(['https://www.googleapis.com/auth/tagmanager.readonly',
              'https://www.googleapis.com/auth/tagmanager.manage.accounts',
              'https://www.googleapis.com/auth/tagmanager.edit.containers',
              'https://www.googleapis.com/auth/tagmanager.publish'
          ]);
  
          $service = new Google_Service_TagManager($client);
          $containers = $service-&gt;accounts_containers-&gt;listAccountsContainers('1746756959');
  </code></pre>