Solved

Is it possible to use store front in a development store?

alexlana
Shopify Partner
2 1 0

Is it possible to call store front API when my store is in development?

 

This is my query:

url = f'https://{self.STORE_NAME}.myshopify.com/admin/api/2024-01/graphql.json'

query = '''{
products(first: 3,after: null) {
pageInfo {
endCursor
startCursor
}
edges {
node {
id
title
variants(first: 250) {
edges {
node {
id
title
availableForSale
}
}
}
}
}
}
}

'''

headers = {
'X-Shopify-Storefront-Access-Token': self.STORE_TOKEN,
'Content-Type': 'application/graphql',
}

response = requests.post(url, data=query, headers=headers)

 

It return this error:

{"errors":"[API] Invalid API key or access token (unrecognized login or wrong password)"}

 

 

I triple check the access tokens, I try the public and the private, check all scope permissions, but it not work.

Accepted Solution (1)

alexlana
Shopify Partner
2 1 0
Reply 1 (1)

alexlana
Shopify Partner
2 1 0

This is an accepted solution.