title: WooCommerce REST Client API - Programmatically get consumer key and secret
body: <p>I am currently using the client-API to implement a simple user front-end to upload products. The function <code>client-&gt;products-&gt;create()</code> seems to work fine, how ever I can’t get around one issue.</p>
  <p>Every time I upload a product, the vendor is set to the admin user instead of the user that is currently logged in. Is there a way to set the vendor through the API? Has anybody get done this?</p>
  <p>This is the function I created that is called by AJaX when the form is submitted (I left key and website fields empty here on purpose):</p>
  <pre class="lang-php prettyprint-override"><code>function addProduct()
  {
  
    $options = array(
      'debug'           =&gt; false,
      'return_as_array' =&gt; false,
      'validate_url'    =&gt; false,
      'timeout'         =&gt; 30,
      'ssl_verify'      =&gt; false,
    );
  
    try {
  
      $client = new WC_API_Client('', '', '', $options);
  
      $productName = $_POST[&quot;productname&quot;];
      $price = $_POST[&quot;price&quot;];
      $discountPrice = $_POST[&quot;discountPrice&quot;];
      $description = $_POST[&quot;description&quot;];
      $shortDescription = $_POST[&quot;shortDescription&quot;];
      $authorId = 5;
  
      $client-&gt;products-&gt;create(array('title' =&gt; $productName, 'type' =&gt; 'simple', 'regular_price' =&gt; $price, 'description' =&gt; $description));
    } catch (WC_API_Client_Exception $e) {
  
      echo $e-&gt;getMessage() . PHP_EOL;
      echo $e-&gt;getCode() . PHP_EOL;
  
      if ($e instanceof WC_API_Client_HTTP_Exception) {
  
        print_r($e-&gt;get_request());
        print_r($e-&gt;get_response());
      }
    }
  
    echo (&quot;Publicado&quot; . $authorId);
  
    // Una función AJaX en WordPress debe siempre terminarse con die().
    die();
  }
  </code></pre>
  <p>The problem seems to be the consumer key and consumer secret, so, is there a way to programmatically provide the clients with API keys and get these dynamically?</p>