Can not use appSubscriptionCreate

use the code

https://shopify.dev/docs/apps/billing/subscriptions/combined-time-usage-based#step-1-create-the-subscription

but it dose not work

use https://shopify.dev/docs/api/shopify-app-remix/v2/apis/billing it work.

but I need a more flexible way


能用中文回复吗?感谢。

Can you reply in Chinese? grateful.


{
  "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"
      }
    }
  ],
  "data": {
    "appSubscriptionCreate": null
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 22,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 2000,
        "currentlyAvailable": 1990,
        "restoreRate": 100
      }
    }
  }
}

Hi @xBei-Qiu ,

Looking at the screenshot we can see that the API request is failing inside the Shopify GraphiQL app. This app cannot be used for registering app billing because it is an app created by Shopify and does not allow changing of the access token that is used.

To register app billing you need to be making the appSubscriptionCreate API call using the access token from your own app.

Tools like Postman and Insomnia are good alternative user interfaces for making API calls that allow using your own access token.

Hope you have a great day

thank you, i try it in Posman first.

good day.