Hello,
I am developing API in which I am integrating Shopify API with scope write_products (add product). When I am calling initialize function it returns null creating directory session path I given as parameter in FileSessionStorage class.
Now when I am calling loadCurrentSession function it required minimum 3 parameter (header, cookie, online)
I get header (authorization token) from admin dashboard and sending online false, I want to ask what should I send in cookie parameter.
require_once('vendor/autoload.php');
use Shopify\Rest\Admin2022_07\Product;
use Shopify\Context;
use Shopify\Utils;
use Shopify\Auth\FileSessionStorage;
$apiKey = '';
$secreteKey = '';
$scope = 'write_products';
$host = 'shop-name.myshopify.com';
$session = Context::initialize(
$apiKey,
$secreteKey,
$scope,
$host,
new FileSessionStorage(__DIR__ . '/session'),
);
$requestHeaders = [
'authorization' => ''
];
$requestCookies = [];
$isOnline = false;
$test_session = Utils::loadCurrentSession(
$requestHeaders,
$requestCookies,
$isOnline
);