title: magento error of creating product
body: <p>i got error of my magento api than i creating the product:</p>
  
  <pre><code>Fatal error: Uncaught SoapFault exception: [2] Access denied. in /Applications/MAMP/htdocs/magento/soap.php:210 Stack trace: #0 /Applications/MAMP/htdocs/magento/soap.php(210): SoapClient-&gt;__call('call', Array) #1 /Applications/MAMP/htdocs/magento/soap.php(210): SoapClient-&gt;call('2017c612ade741b...', 'product_attribu...') #2 /Applications/MAMP/htdocs/magento/soap.php(90): Client-&gt;_APIgetAttributeSets() #3 /Applications/MAMP/htdocs/magento/soap.php(269): Client-&gt;APIcreateNewProduct(Array) #4 {main} thrown in /Applications/MAMP/htdocs/magento/soap.php on line 210
  </code></pre>
  
  <p>this is my method:</p>
  
  <pre><code>public function APIcreateNewProduct( $newProductData ) {
  
      $error = array();
  
      if( empty( $newProductData ) ) {
          $error[] = 'Empty product data';
      }
  
      if( empty( $error ) ) {
  
          $token = $this-&gt;_getToken();
          $client = $this-&gt;_getClient();
  //90 line
          $set = $this-&gt;_APIgetAttributeSets();
  
          $productId = $client-&gt;call($token, self::CREATE_PRODUCT, array('simple', $set['set_id'], rand().'sku_of_product', $newProductData));
          return $productId;
  
      } else {
          return $this-&gt;_apiJsonResult( $error );
      }
  
  }
  </code></pre>
  
  <p>and its _APIgetAttributeSets():</p>
  
  <pre><code>private function _APIgetAttributeSets() {
  
      $token = $this-&gt;_getToken();
      $client = $this-&gt;_getClient();
  //210 LINE
      $attributeSets = $client-&gt;call($token, self::PRODUCT_ATTRIBUTE_LIST);
      $set = current($attributeSets);
  
      return $set;
  }
  </code></pre>
  
  <p>Login and retrieving the product list are fine.</p>
  
  <p>where is my mistake with creating? thank you</p>