`activeSubscription` returns "Only public app must can access active subscription" — even though app is public?

Hi all, I’m getting a frustrating error when querying activeSubscription via the Partner API. The only response I get is that my app isn’t public.

It’s public and on the app pricing (previously managed pricing)

I’ve check the partner token permissions, reviewed the app and shop ID’s, checked with dev assistant, etc.

I tried testing via graphql and via the partner graphql explorer.

The query

query ActiveSubscriptionMinimal($appId: ID!, $shopId: ID!) {
  activeSubscription(appId: $appId, shopId: $shopId) {
    billingPeriod
    cancelAtEndOfCycle
    trialEndsAt
    shop {
      id
      myshopifyDomain
    }
  }
}

Variables

{
  "appId": "gid://shopify/App/129687",
  "shopId": "gid://shopify/Shop/4573560961"
}

Error response

{
  "errors": [
    {
      "message": "Only public app must can access active subscription",
      "locations": [{ "line": 2, "column": 3 }],
      "path": ["activeSubscription"]
    }
  ],
  "data": {
    "activeSubscription": null
  }
}

Hey @cfetter - thanks for flagging. If you’re able to, could you run the query through cURL (using your partner access token) like this:

curl -I https://example.com to grab the response headers and share an X-Request-ID from the response header for one of the example errors you’re seeing? I can grab some logs and take a look on our end with that info since it does seem odd that this is happening.

Hope to hear from you soon!

Thanks @Alan_G

x-request-id: 74264974-b192-478f-a58c-f2e6a01466e6-1782404334

Thanks @cfetter - can confirm, your app is indeed public, this is a little odd. I’m going to reach out to some folks internally so we can look into this more deeply. Speak with you as soon as I have more info here on my end.

Thx @Alan_G, glad we are still public :slight_smile:

Look forward to hearing more

We just shipped an update in this space - could you try querying activeSubscription again @cfetter ?

@Liam-Shopify Thanks Liam, I have confirmed that it is now working correctly for us. Also a thanks to @Alan_G for his assistance.