title: Problems with making ebay REST api call
body: <p>I've write following code:</p>
  
  <pre><code>    include('httpful.phar');
  include('config.php');
  use \Httpful\Request;
  
  class fullfil_pol_data{
      public $name='1dzien';
      public $marketplace='EBAY_PL';
      public $category=array('name' =&gt; 'ALL_EXCLUDING_MOTORS_VEHICLES');
      public $czas_wysylki=array('value'=&gt; 1, 'unit'=&gt;'DAY');
  }
  class aukcja{
      public $ilosc;
      public $cat_id;
      public $format;
      public $opis;
  }
  class token{
      public $token;
      private $duration;
      private $starts;
      public function __construct($t, $d){
          $this-&gt;token=$t;
          $this-&gt;duration=$d;
          $this-&gt;starts=time();
      }
      public function check(){
          if($this-&gt;duration+$this-&gt;starts &gt;= time()-15*60) ibej::get_token();
      }
  }
  class ibej{
      private $token;
      private $sandbox=true;
      public function get_token()
      {
          if(this-&gt;sandbox) $url='https://api.sandbox.ebay.com/identity/v1/oauth2/token';
          $req= Request::post($url)-&gt;addHeader('Content-Type', 'application/x-www-form-urlencoded')
                                          -&gt;addHeader('Authorization', 'Basic '.PASSES)
                                          -&gt;body("grant_type=client_credentials&amp;redirect_uri=Marketing_Desig-Marketin-wystaw-blzyg&amp;scope=https://api.ebay.com/oauth/api_scope")-&gt;send();
          $this-&gt;token = new token($req-&gt;body-&gt;access_token, $req-&gt;body-&gt;expires_in);
          var_dump($this-&gt;token);
      }
  
      /*$url='https://api.sandbox.ebay.com/sell/inventory/v1/offer';
      //$req= Request::post($url)-&gt;addHeader('Authorization', 'Bearer '.$token)
          //                          -&gt;addHeader('X-EBAY-C-MARKETPLACE-ID', 'EBAY-PL')
          */
      public function post_fullfilment_policy()
      {
          if(this-&gt;sandbox) $url='https://api.sandbox.ebay.com/sell/account/v1/fulfillment_policy';
          $test= new fullfil_pol_data;
          $req= Request::post($url)-&gt;addHeader('Authorization', 'Bearer '.$this-&gt;token-&gt;token)
                                  -&gt;addHeader('Accept', 'application/json')
                                  -&gt;addheader('Content-Type', 'application/json')
                                  -&gt;addHeader('X-EBAY-C-MARKETPLACE-ID', 'EBAY-US')
                                  -&gt;body(json_encode($test))-&gt;send();
          var_dump($req);
      }
  }
  $ibej_api = new ibej;
  $ibej_api-&gt;get_token();
  $ibej_api-&gt;post_fullfilment_policy();
  </code></pre>
  
  <p>When I try to call fullfilmentpolicy (<a href="http://developer.ebay.com/Devzone/rest/api-ref/account/fulfillment_policy__post.html" rel="nofollow noreferrer">http://developer.ebay.com/Devzone/rest/api-ref/account/fulfillment_policy__post.html</a>) with ->post_fullfilment_policy() method I've this error in response:</p>
  
  <p><em>"{"errors":[{"errorId":1100,"domain":"ACCESS","category":"REQUEST","message":"Access denied","longMessage":"Insufficient permissions to fulfill the request."}]}"</em></p>
  
  <p>I don't know what is wrong, I reckon that If I have obtained token, it should give me permissions to do things with my account. Could anyone help me?</p>