Focuses on API authentication, access scopes, and permission management.
I am trying to test out the billingAPI but am getting an access error when I test the mutation in the graphql explorer. Does anyone know what app permissions are required to perform the mutation?
mutation { appSubscriptionCreate( name: "Super Duper Recurring Plan" test: true returnUrl: "http://super-duper.shopifyapps.com" lineItems: [{plan: {appRecurringPricingDetails: {price: {amount: 10.00, currencyCode: USD}, interval: EVERY_30_DAYS}}}] ) { userErrors { field message } confirmationUrl appSubscription { id test } } }
{
"data": {
"appSubscriptionCreate": null
},
"errors": [
{
"message": "Access denied for appSubscriptionCreate field.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"appSubscriptionCreate"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes"
}
}
],
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 990,
"restoreRate": 50
}
}
}
}
Glad to see this community is so responsive and helpful. I'm guessing it's not working either because I am doing it through the graphqlAPI or i haven't chosen my distribution. I find it so sad that this information i found after hours of searching is not in your dev docs... https://github.com/Shopify/shopify-api-js/blob/main/docs/guides/billing.md