Cannot register COLLECTION_LISTINGS_* and PRODUCT_LISTINGS_* webhooks with my sales channel

devenbryant
Shopify Partner
16 2 7

My sales channel is able to register PRODUCTS_CREATE webhook just fine, but when i try to register sales channel related webhooks like COLLECTION_LISTINGS_ADD i get the following error message in the response:

 

"You cannot create a webhook subscription with the specified topic"

 

I've been trying different scopes but to no success.  Current scope is set to ['unauthenticated_read_product_listings', 'read_product_listings', 'read_products', 'write_products', 'write_orders', 'read_orders']

 

app details.JPG

 

 

 

Replies 10 (10)

Alex
Shopify Staff
1561 81 341

Hey @devenbryant.

 

Are you certain you have the read_product_listings scope? I'm able to successfully create webhook subscriptions for collection_listings and product_listings with that scope. Another thing we could consider is whether your app is in fact a sales channel app. If you could give me your app ID (the INT at the end of the URL when viewing the app in your partner dashboard) I can take a closer look. A time frame in which you're trying to create these webhooks will also give me logs to look at (past 12 days or less).

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

devenbryant
Shopify Partner
16 2 7

Thanks for the reply,

 

I'm fairly certain I have read_product_listing scoped.  I tried adding all scopes in desperation, but no luck.  Below is the response i get from querying the graphql api for publications (app id is 2739035).  It looks like I'm scoped for everything as expected.  I've been working on this the past couple days.

{
  "data": {
    "publications": {
      "edges": [
        {
          "cursor": "eyJsYXN0X2lkIjoyOTUzMzI3NDE5MiwibGFzdF92YWx1ZSI6Mjk1MzMyNzQxOTJ9",
          "node": {
            "app": {
              "id": "gid://shopify/App/580111",
              ...
            }
          }
        },
        {
          "cursor": "eyJsYXN0X2lkIjozMDkxNDgzODYwOCwibGFzdF92YWx1ZSI6MzA5MTQ4Mzg2MDh9",
          "node": {
            "app": {
              "id": "gid://shopify/App/2739035",
              "description": null,
              "embedded": true,
              "features": [],
              "handle": "testapp-603",
              "installation": {
                "accessScopes": [
                  {
                    "description": "Read product information",
                    "handle": "unauthenticated_read_product_listings"
                  },
                  {
                    "description": "Read product information",
                    "handle": "read_product_listings"
                  },
                  {
                    "description": "Modify products, variants, and collections",
                    "handle": "write_products"
                  },
                  {
                    "description": "Modify orders, transactions, and fulfillments",
                    "handle": "write_orders"
                  },
                  {
                    "description": "Modify store content like articles, blogs, comments, pages, and redirects",
                    "handle": "write_content"
                  },
                  {
                    "description": "Modify theme templates and theme assets",
                    "handle": "write_themes"
                  },
                  {
                    "description": "Modify customer details and customer groups",
                    "handle": "write_customers"
                  },
                  {
                    "description": "Modify draft orders",
                    "handle": "write_draft_orders"
                  },
                  {
                    "description": "Modify inventory",
                    "handle": "write_inventory"
                  },
                  {
                    "description": "Read locations",
                    "handle": "read_locations"
                  },
                  {
                    "description": "Modify script tags in your store's theme template files",
                    "handle": "write_script_tags"
                  },
                  {
                    "description": "Modify fulfillment services",
                    "handle": "write_fulfillments"
                  },
                  {
                    "description": "Modify shipping rates, countries, and provinces",
                    "handle": "write_shipping"
                  },
                  {
                    "description": "Read analytics",
                    "handle": "read_analytics"
                  },
                  {
                    "description": "Modify checkouts",
                    "handle": "write_checkouts"
                  },
                  {
                    "description": "Modify reports",
                    "handle": "write_reports"
                  },
                  {
                    "description": "Modify price rules",
                    "handle": "write_price_rules"
                  },
                  {
                    "description": "Modify marketing events and related marketing engagement data",
                    "handle": "write_marketing_events"
                  },
                  {
                    "description": "Modify resource feedbacks",
                    "handle": "write_resource_feedbacks"
                  },
                  {
                    "description": "Read Shopify Payments balance and payouts",
                    "handle": "read_shopify_payments_payouts"
                  },
                  {
                    "description": "Read Shopify Payments disputes",
                    "handle": "read_shopify_payments_disputes"
                  },
                  {
                    "description": "Read products, variants, and collections",
                    "handle": "read_products"
                  },
                  {
                    "description": "Read orders, transactions, and fulfillments",
                    "handle": "read_orders"
                  },
                  {
                    "description": "Read store content like articles, blogs, comments, pages, and redirects",
                    "handle": "read_content"
                  },
                  {
                    "description": "Read theme templates and theme assets",
                    "handle": "read_themes"
                  },
                  {
                    "description": "Read customer details and customer groups",
                    "handle": "read_customers"
                  },
                  {
                    "description": "Read draft orders",
                    "handle": "read_draft_orders"
                  },
                  {
                    "description": "Read inventory",
                    "handle": "read_inventory"
                  },
                  {
                    "description": "Read script tags in your store's theme template files",
                    "handle": "read_script_tags"
                  },
                  {
                    "description": "Read fulfillment services",
                    "handle": "read_fulfillments"
                  },
                  {
                    "description": "Read shipping rates, countries, and provinces",
                    "handle": "read_shipping"
                  },
                  {
                    "description": "Read checkouts",
                    "handle": "read_checkouts"
                  },
                  {
                    "description": "Read reports",
                    "handle": "read_reports"
                  },
                  {
                    "description": "Read price rules",
                    "handle": "read_price_rules"
                  },
                  {
                    "description": "Read marketing events and related marketing engagement data",
                    "handle": "read_marketing_events"
                  },
                  {
                    "description": "Read resource feedback",
                    "handle": "read_resource_feedbacks"
                  }
                ]
              }
            }
          }
        }
      ]
    }
  },

Also my app does show up under Sales Channel in the the store adminsalechannel.JPG.

devenbryant
Shopify Partner
16 2 7

Adding log readout on my client during webhook registrationnodelogs.JPG

Alex
Shopify Staff
1561 81 341

At a glance this is pretty bizarre. It looks like there aren't currently any active access tokens. Would you mind creating a new one so I can test from my end (with your permission)? based on everything I can see so far, you should have not had issues.

 

Let me know when you've done that and I can take another look.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

devenbryant
Shopify Partner
16 2 7

@Alex I just now reinstall TestApp to generate a new access token.  Same results on my end.

Alex
Shopify Staff
1561 81 341

Hey @devenbryant, thanks for that. Using your access token, I'm interestingly not having issues creating both product_listings/remove and collection_listings/remove webhooks with post requests to https://deezyloopdev.myshopify.com/admin/webhooks.json using your current access token.

 

Can you pass me a new x-request-id response header if this is ongoing for you?

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

devenbryant
Shopify Partner
16 2 7

Sure, below are the x-request-id's for each webhook registration call:

 

topic:  PRODUCT_LISTING_ADD

result:  Failed;  You cannot create a webhook subscription with the specified topic

x-request-id:  0f0d59e1-92f1-438b-865c-bfb4cafac219

 

topic:  PRODUCTS_CREATE

result:  Succeeded

x-request-id:  de8ff24c-a292-4d5b-a3f8-70b1a7cfac66

 

I made these request a few minutes prior to this post.

 

 

 

Alex
Shopify Staff
1561 81 341

Apologies for the delay. The definitely looks to be a bug. I'm seeing success when using REST, so that will work as a temporary workaround, but GraphQL does not seem to acknowledge the necessary access scopes. I'll let you know where when this is resolved and/or I know more.

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

devenbryant
Shopify Partner
16 2 7

Thanks for looking into this, Alex.  I'll revert back to using REST API calls for now.

Lull
Excursionist
37 1 10

Hi,

 

What is the current status for this?
Is the overall conclusion that the webhookSubscriptionCreate only works for app uninstalled for the GraphQL API?

 

Thanks,

-Louise