Shopify private app – get started
Fabian Blechschmidt
The documentation of shopify APIs is pretty good. Unfortunately I failed miserably to authenticate – and this is because from my point of view the naming of the PHP client is wrong – at least for private apps.
Big shout out to Fatih Samur whos blog entry helped me a lot!
This is the app info for private apps in the backend.
Context::initialize(
$_ENV['SHOPIFY_API_KEY'],
$_ENV['SHOPIFY_API_SECRET'],
$_ENV['SHOPIFY_APP_SCOPES'],
$_ENV['SHOPIFY_APP_HOST_NAME'],
new FileSessionStorage('/tmp/php_sessions'),
'2021-04',
true,
false,
);
And this is the code example of the shopify php client .
$_ENV['SHOPIFY_API_KEY'], // => API-Schlüssel (the value in the middle)
$_ENV['SHOPIFY_API_SECRET'], // => TOKEN(!!) NOT THE SECRET!
$_ENV['SHOPIFY_APP_SCOPES'], // => Whatever you defined, comma separated.
$_ENV['SHOPIFY_APP_HOST_NAME'], // => your host without https:// and / as suffix.
Hope that helps someone in the future.
Other articles from this category
Two Bitbucket Pipelines runners, one ID, and a git clone error for a directory that wasn’t there
A pipeline run failed with this: Fine, I thought, some leftover build directory, I’ll just rm -rf it and re-run. Except the directory wasn’t there. I checked. Twice. Git was very sure a non-empty directory existed at that exact path a few seconds ago, and the filesystem was equally sure it had never heard of […]
Monitoring our own product-export feeds with n8n and OhDear (and a bug I found while writing this)
Last post was about how a product export can get stuck forever after a queue worker gets OOM-killed mid-generation — is_running never resets, the export silently stops updating, and nothing in Shopware tells you. That post is exactly why this workflow exists. We run about 20 product-export feeds across several shops (Google Shopping, Idealo, Geizhals, […]
product-export:generate does nothing — until you turn off „Generate via scheduler“
We run several product exports (Google Shopping, a couple of price comparison feeds) with „Generate via scheduler“ checked in the Sales Channel settings. One night the queue worker died with an OOM kill — two big exports had become due in the same tick and the box didn’t have RAM for both at once. Fine, […]
Schreibe einen Kommentar