Connecting to shopify and returning products
<p>I'm tring to return products from my shopify store and dump the expected returned json on to the page.  No products return via the code but if I go directly to the url in the form below I get the expected json displayed on the page:</p>

<pre><code>https://API_KEY:PASSWORD@your-store.myshopify.com/admin/products.json
</code></pre>

<p>Can anyone help me return the json using <a href="https://github.com/joshrps/laravel-shopify-API-wrapper" rel="nofollow">this package</a> which I'm using to connect to shopify?  I'm also using Laravel 5.</p>

<p>I've noticed that the Input calls return nothing:</p>

<pre><code>Input::get('code');
Input::all();
</code></pre>

<p>I added this to app.php:</p>

<pre><code>'Input' =&gt; Illuminate\Support\Facades\Input::class,
</code></pre>

<p>I'm getting this error:</p>

<pre><code>ERROR #22: The requested URL returned error: 401
in api.php line 309 at API-&gt;call(array('METHOD' =&gt; 'GET', 'URL' =&gt; '/admin/products.json?page=1')) in routes.php line 87
</code></pre>

<p>This is my route:</p>

<pre><code>Route::get('/show_products', function() {

$shopify = App::make('ShopifyAPI');

// This creates an instance of the Shopify API wrapper and
// authenticates our app.
$shopify = App::make('ShopifyAPI', [
  'API_KEY' =&gt; 'api_key',
  'API_SECRET' =&gt; 'api_secret',
  'SHOP_DOMAIN' =&gt; 'shop_domain.myshopify.com',
  'ACCESS_TOKEN' =&gt; 'access_token'
]);

$shopify-&gt;installURL(['permissions' =&gt; array('read_products', 'write_products'), 'redirect' =&gt; 'https://dev.shopify.com/public/']);

try {
      $verify = $shopify-&gt;verifyRequest(Input::all(), true);
      if ($verify)
      {
        $code = Input::get('code');
        echo "code: ".$code; // no code returned
        $accessToken = $shopify-&gt;getAccessToken($code);
        echo "accessToken: ".$accessToken; // no access token
      }
      else
      {
        echo "issue with data";
        // Issue with data
      }

} 
catch (Exception $e)
{
    echo '&lt;pre&gt; Error: ' . $e-&gt;getMessage() . '&lt;/pre&gt;';
}

// Gets a list of products

  $result = $shopify-&gt;call([
    'METHOD'     =&gt; 'GET',
    'URL'         =&gt; '/admin/products.json?page=1'
  ]);

$products = $result-&gt;products;
print_r($products);
exit;
});
</code></pre>