Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi all,
I'm building an app using the node app template cli-three. Inside of ensure-billing.js there is a query for `activeSubscriptions` within the `currentAppInstallation` but I receive "access denied" in the response from Shopify. Here's the culprit query:
query appSubscription {
currentAppInstallation {
activeSubscriptions {
name, test
}
}
}
I'm using api version `2022-07` and I have been approved for subscription access within the partner dashboard. My access scopes are: `read_customers,read_locales,read_orders,read_products,write_customer_payment_methods,write_own_subscription_contracts`
Here is the response:
{
data: null,
errors: [
{
message: 'access denied',
locations: [ { line: 4, column: 7 } ],
path: [ 'currentAppInstallation', 'activeSubscriptions' ]
}
],
extensions: {
cost: {
requestedQueryCost: 2,
actualQueryCost: 2,
throttleStatus: {
maximumAvailable: 1000,
currentlyAvailable: 992,
restoreRate: 50
}
}
}
}
Is there something I'm missing?
Thanks in advance!
Solved! Go to the solution
This is an accepted solution.
After some research, this post helped me solve the issue.
Apparently you need to be the "store owner" to have access to activeSubscriptions (unfortunately the docs don't give any clues about this resulting in wasted time). This is only the case if you are using "online" tokens which give permissions based on the user who is logged in and using the app. User based permissions were not required for my project, so changing to "offline" tokens solved the issue.
This is an accepted solution.
After some research, this post helped me solve the issue.
Apparently you need to be the "store owner" to have access to activeSubscriptions (unfortunately the docs don't give any clues about this resulting in wasted time). This is only the case if you are using "online" tokens which give permissions based on the user who is logged in and using the app. User based permissions were not required for my project, so changing to "offline" tokens solved the issue.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025