title: Unsupported get request using Ads Facebook SDK for PHP
body: <p>I'm trying to access ads campaigns related data (such as country, cpm, spent ...)  using Facebook <a href="https://github.com/facebook/facebook-php-ads-sdk" rel="nofollow">php-ads-sdk</a></p>
  
  <p>The Facebook user is already added as admin in Facebook Bussiness Manager.</p>
  
  <p>The first thing I do is get the access token given the <em>app_secret</em> and <em>app_id</em> of the user:</p>
  
  <pre><code>public function getAccessToken()
  {
      try {
          $response = $this-&gt;client-&gt;get(
              $this-&gt;accessTokenUrl, [
              'query' =&gt; [
                  'client_id' =&gt; $this-&gt;appId,
                  'client_secret' =&gt; $this-&gt;appSecret,
                  'grant_type' =&gt; 'client_credentials',
              ],
              'stream' =&gt; true
          ]);
      } catch(RequestException $e) {
          echo $e-&gt;getMessage();
      }
  
      $body = $response-&gt;getBody();
      $contents = $body-&gt;getContents();
  
      $contentsArray = explode('=', $contents);
  
      return $contentsArray[1];
  }
  </code></pre>
  
  <p>It comes in the form:</p>
  
  <blockquote>
    <p>access_token=xxxxxx</p>
  </blockquote>
  
  <p>That's why I have to make an explode.</p>
  
  <p>Once I got the access token, I authenticate in the Api:</p>
  
  <pre><code>Api::init($this-&gt;appId, $this-&gt;appSecret, $this-&gt;accessToken);
  $api = Api::instance();
  </code></pre>
  
  <p>Finally I try to get some data using the Bussiness Manager account id:</p>
  
  <pre><code>$account = new AdAccount($this-&gt;accountId);
  $test = $account-&gt;getAdCampaigns();
  </code></pre>
  
  <p>But I get the following error message:</p>
  
  <blockquote>
    <p>[FacebookAds\Http\Exception\AuthorizationException]<br>
    Unsupported get request. Please read the Graph API documentation</p>
  </blockquote>
  
  <p>Any suggestions?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>As suggested in the first comment by Paul Bain, I changed these lines:</p>
  
  <pre><code>$account = new AdAccount($this-&gt;accountId);
  $test = $account-&gt;getAdCampaigns();
  </code></pre>
  
  <p>For these ones: </p>
  
  <pre><code>$account = new AdAccount('act_' . $this-&gt;accountId);
  $test = $account-&gt;getAdCampaigns();
  </code></pre>
  
  <p>And now I get a different error message:</p>
  
  <blockquote>
    <p>(#10) You do not have sufficient permissions to perform this action</p>
  </blockquote>
  
  <p>I don't know why I don't have sufficient permissions, since as I said before the user is added as admin in Facebook Bussiness Manager.</p>
  
  <p>Also in the facebook user profile, under settings/advanced, the Facebook Bussiness Manager account id is added in 'Authorized Ad Account IDs'</p>
  
  <p>The app is approved for Basic access level.</p>