Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Please tell how to set the values to the sub,exp,nbf,iat elements in below code.
$payload = [ 'iss' => 'https://XXXXXXXXX.myshopify.com/admin', 'dest' => 'https://XXXXXXXX.myshopify.com', 'aud' => YOUR APP API KEY, 'sub' => HOW SET THIS VALUE IN PHP,//<user ID 'exp' => HOW SET THIS VALUE IN PHP,//time in seconds 'nbf' => HOW SET THIS VALUE IN PHP,//time in seconds 'iat' => HOW SET THIS VALUE IN PHP,//time in seconds 'jti' => Uuid::uuid1(), 'sid' => HOW SET THIS VALUE IN PHP ]; $jwt = JWT::encode($payload, 'YOUR APP SECRET KEY', 'HS256'); $headers['authorization'] = "Bearer " . $jwt; $headers['api_version'] = config('shopify.apiVersion'); $currentSession = Utils::loadCurrentSession($headers, $_COOKIE, true); echo $currentSession->getAccessToken();
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025