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
15905 2378 3087

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

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free