Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I'm trying to create a simple app that reads our stores products, contacts an external API to get stock levels then update our stores products with the new stock levels how ever encountering alot of issues..
The examples for the graphQL library for php seems to be a bit strange, says i need to authenticate my app using auth0 which will give me a session token and allow me to query then my shopify store using graphQL however that seems strange to me?
This app will be completely headless.. will be run on a cron job so why would i need to authenticate? Isn't that what my stores api key and access token is for?
Anyway i tried to then make a request to my store https://XXXXXX/admin/api/2025-01/graphql.json
with the X-Shopify-Access-Token in the headers and i get a curl error " cURL error 6: Could not resolve host: login"
if i try visit that url in my browser a login box prompts for a username and password?
Any help would be appreciated, thanks.
Shopify's PHP SDK is unfortunately geared toward regular Oauth (browser) users. You can use Context::initialize() to get things started for headless usage.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025