Focuses on API authentication, access scopes, and permission management.
Hi
I am trying in vain to connect to the API using GraphQL as it seems other methods I use that do connect won't allow me to do an update to a product.
Here is my code
$headers = array(
"api_version" => "2024-07",
"X-Shopify-Access-Token" => $this->accessToken,
"Authorization" => "Bearer $this->accessToken"
);
$cookies = array();
$isOnline = true;
$session = \Shopify\Utils::loadCurrentSession(
$headers,
$cookies,
$isOnline
);
$client = new Shopify\Clients\Graphql(
$session->getShop(),
$session->getAccessToken()
);
which just returns this error
Fatal error: Uncaught TypeError: Key material must be a string, resource, or OpenSSLAsymmetricKey in /Users/xxxxxx/Sites/MCMS/vendor/firebase/php-jwt/src/Key.php:31
Really struggling, lots of posts on this all with conflicting information, the documentation does not explain what is required in the $headers array or the $cookies array