Liquid, JavaScript, themes, sales channels
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();
User | RANK |
---|---|
37 | |
28 | |
14 | |
13 | |
9 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023