Access Denied even after having Write_Products permission while Create Collection via GraphQL

Access Denied even after having Write_Products permission while Create Collection via GraphQL

WareWorks
Visitor
2 0 0

Tested everything with the permissions for the CustomApps and via GraphQL Explorer and via Shopify GraphQL App

Mutation - 

mutation collectionCreate {

collectionCreate(input: {title: "Nike Air Jordan"}) {

userErrors {
field
message
}

collection {
title
}
}
}

 

RESPONSE - 

{
"data": {
"collectionCreate": null
},
"errors": [
{
"message": "CollectionCreate access denied",
"locations": [
{
"line": 3,
"column": 1
}
],
"path": [
"collectionCreate"
]
}
],
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 990,
"restoreRate": 50
}
}
}
}

 

 

Reply 1 (1)

oscprofessional
Shopify Partner
16343 2438 3177

Hello @WareWorks 
For creating collection using Shopify graphql
you need to go to the following permission path and set particular permission for collection

 

Settings -> Apps and sales -> develop app -> your app name -> configuration


1. You'll need the write_content or write_products scope to create collections.

Basic query for create collection

mutation {
collectionCreate(input: {title: "Digital watches ", descriptionHtml:"A digital watches "}) {
collection {
id
descriptionHtml
}
}
}

 

thank you

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...