I'm new to Shopify, I have to develop shopify app API using It's Shopify API in laravel 5. I have created app in my Development store, but when I am trying to install it on store it's giving authentication error.
As per documentation when user click on install app it redirects to the application callback url with access code as 'code'
parameter in url string.
by using this code we need to call verify request method to generate permanent Access Token.
When I'm trying to do this shopify is redirecting me to the callback url but there is no 'code'
in list.
I have set callback url in my app which is my localhost url converted by ngrok url (http://36481603.ngrok.io
) by using this url I am redirecting user to my API controller where I have below code...
$sh = App::make('ShopifyAPI');
try
{
$verify = $sh->verifyRequest(Input::all());
if ($verify)
{
$code = Input::get('code');
$accessToken = $sh->getAccessToken($code);
}
else
{
// Issue with data
}
}
catch (Exception $e)
{
echo '<pre>Error: ' . $e->getMessage() . '</pre>';
}
Please provide if there is a step-by-step documentation for new app development in shopify.
Thanks in advance.