In order to use the Storefront API we created a private app to have access to the token and app ID, however when we create a product it is not associated to that private app and this product is not returned by the query to the Storefront API, does anyone know how I can solve this problem?
Hey @capitaofausto
Please send me the GraphQL queries you are trying when you a) Create a product and b) query the Storefront API, together with the responses you receive and I can take a look. Thanks!
Request URL : https://storename.myshopify.com/admin/api/2022-07/products.json (POST)
(storename has the actual name)
{
“product”: {
“title”: "Rest Admin API TEST -7 ",
“body_html”: “Good snowboard!</strong>”,
“variants”: [
{
“price”: “50.00”,
“sku”: “test1”
}
]
}
}
Get Product Query :
Request URL : https://storename.myshopify.com/admin/api/2022-07/graphql.json (GET)
(storename has the actual name)
query getProductById($id: ID!){
product(id: $id) {
id
title
description
availableForSale
productType
handle
tags
images (first: 1){
edges{
node{
url
}
}
}
variants (first: 3) {
edges{
node{
id
title
priceV2 {
amount
currencyCode
}
quantityAvailable
}
}
}
}
}
Query Argument :
id:“gid://shopify/Product/929898465”
The Get Product Storefront Query wroks fine when I create a test product from the admin store webpage itself. But when trying to retrieve products that are created by the create product API it is not possible to fetch them as they don’t have the private app created for the storefront as one of the sales and channels by default
The app that has my admin api and storefront api credentials isn’t coming here by default
