So I implemented a Graphql appSubscriptionCreate mutation within an app previously and it was successful. However I'm now experiencing problems when making the call - I'm getting a 'Error: GraphQL error: AppSubscriptionCreate access denied' response.
I've also tried running the basic mutation seen in the docs (below) but that's still got the problem. I don't understand how access could be denied, AppSubscriptionCreate doesn't require any scopes. All other queries and mutations are working fine, I can even still query subscriptions.
mutation { appSubscriptionCreate( name: "Super Duper Recurring Plan" returnUrl: "http://super-duper.shopifyapps.com" lineItems: [{ plan: { appRecurringPricingDetails: { price: { amount: 10.00, currencyCode: USD } } } }] ) { userErrors { field message } confirmationUrl appSubscription { id } } }
The React component making the call
<Mutation mutation={testQl}> {(handleSubmitTest, { error, data }) => { if(error) {console.log(error)} if(data && data.appSubscriptionCreate.confirmationUrl) { redirectToPage(data.appSubscriptionCreate.confirmationUrl); } return ( <Button onClick={() => {handleSubmitTest()}}>Hi</Button> ) }} </Mutation>
Any help would be massively appreciated.
Solved! Go to the solution
I am suddenly getting the exact same problem within the last few days. I have tons of clients complaining to me now. Did something change on Shopify's end?
Same issue on my app as well. I have been trying to sort this out for hours but no luck. I just had a chat with shopify support team, they are examining the issue and hopefully it will be resolved soon.
Elaborated and posted some debugging here:
https://community.shopify.com/c/Shopify-APIs-SDKs/Access-Denied-Recurring-Charge-Expired/m-p/725070
Same issue.
Glad to know I'm not crazy and it's happening to everyone. I tried calling Shopify's Partner Support and they told me "we can't help with coding issues" and said just to post here so other partners can help give feedback -.- this is clearly an issue that happened on their end and not some simple code issue.
My guess is they deployed something specific to the graphQL service which is causing the scope check to fail.
Is everyone else using the graphQL method of making the subscription? Or has anyone tried the REST API method? I'm curious if they're both failing. Though I wanna say the REST method has to be controlled on the partner's end for rebilling rather than on shopify's end with the other method.
It's not just me :-) Using the 2020-04 API version. Tried from dev as well as a production server and both do not work. I thought perhaps it was a code problem that I was having ...
User | Count |
---|---|
13 | |
12 | |
7 | |
4 | |
4 |