I am using django and making an app for shopify my app is published on shopify but not visible on its store. I can easily onboard any test store to my app and everything works smoothly . but recently I made a real store and tried to install my app from the shopify app store url but when it hit APP_SUBSCRIPTION_CREATE graphql API, it gives this error b’{“errors”:“Not Found”}’ HTTP Error 404: Not Found why is this happening
Here is the code for GraphQL API:
variables = {
"name": obj.name,
"returnUrl": f"https://{app_url}/shopify/return_url/",
"test": obj.test,
"lineItems": [
{
"plan": {
"appUsagePricingDetails": {
"terms": obj.terms,
"cappedAmount": {
"amount": str(obj.capped_amount),
"currencyCode": "USD"
}
}
}
}
]
}
import json
result = graphql_client.execute(APP_SUBSCRIPTION_CREATE, variables)
APP_SUBSCRIPTION_CREATE = """
mutation AppSubscriptionCreate($name: String!, $returnUrl: URL!, $test: Boolean, $lineItems: [AppSubscriptionLineItemInput!]!) {
appSubscriptionCreate(name: $name, returnUrl: $returnUrl, test: $test, lineItems: $lineItems) {
userErrors {
field
message
}
appSubscription {
id
lineItems {
id
plan {
pricingDetails
__typename
}
}
}
confirmationUrl
}
}
"""
I am getting the error here
graphql_client.execute(APP_SUBSCRIPTION_CREATE, variables)