public app php get products

Highlighted
New Member
40 0 0

Hey,

I have developed the app with reference code in php which will get the product listing of stores who will install the app

The problem is that the code which i have used is for session based.

If multiple merchants installs the app then how it will work the authenication process?

$shopify = shopify\client($_SESSION['shop'], SHOPIFY_APP_API_KEY, $_SESSION['oauth_token']);

$products = $shopify('GET /admin/products.json', array('published_status'=>'any'));

is $_SESSION['oauth_token'] is same always for that particular store?

 

 

0 Likes
Shopify Staff
Shopify Staff
533 0 84

Hi Santoor,

Yes, an OAuth access token has an unlimited lifespan and is only destroyed when the merchant uninstalls the application or you destroy the secret key that was used to generate that access token (from your partner dashboard).

Hope this helps!

0 Likes