How can I give Storefront API access to my app?
Topic summary
A developer encounters the error “Your app doesn’t have a publication for this shop” when attempting to publish a product to the online store using the publishablePublish GraphQL mutation, despite the product being successfully published.
Key troubleshooting suggestions provided:
- Verify the
onlineStorePublicationIdis correct by querying the publications object in the Admin API - Ensure proper app permissions are configured in the Shopify Partners dashboard
- Check that the
inputparameter structure matches the expected array format:[{ publicationId: onlineStorePublicationId }] - Confirm the product ID is valid and the API version is current
- Add proper error handling for async operations
Point of confusion:
The developer notes that Shopify’s official documentation for publishablePublish shows examples using only the Admin API access token (not Storefront API), which contradicts initial suggestions about needing Storefront API access.
Clarification on API usage:
- Admin API: Used for back-end store management operations like creating/publishing products (requires Admin access token)
- Storefront API: Used for front-end customer-facing operations like displaying products (requires Storefront access token)
The discussion remains ongoing, with the root cause of the publication error still unresolved. The focus has shifted to understanding when Storefront API access is actually necessary versus Admin API access.