I tried creating a webhook for reading orders, but I get unauthorized access response. This only happens when I am trying to trigger the webhooks from the browser but from the bash it seems to be working fine. I used the remix template to create the shopify app and added an entry to the shopify app config file. Rest of the code is in the routes. Can someone please suggest me the steps from the beginning on how to create a webhook in similar fashion.
I guess you are using Shop-specific webhooks.
Can you please check subscribing Shop-specific webhooks on Shopify app Remix?
application_url = "https://regulatory-spin-wooden-albuquerque.trycloudflare.com"
embedded = true
name = "meeeooww-store"
handle = "meeeooww-store"
[build]
include_config_on_deploy = true
automatically_update_urls_on_dev = true
[webhooks]
api_version = "2025-01"
[[webhooks.subscriptions]]
topics = [ "app/uninstalled" ]
uri = "/webhooks/app/uninstalled"
[[webhooks.subscriptions]]
topics = [ "app/scopes_update" ]
uri = "/webhooks/app/scopes_update"
[[webhooks.subscriptions]]
topics = [ "orders/create" ]
uri = "/webhooks/app/orders_create"
[access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = "read_orders,write_orders, write_products"
[auth]
redirect_urls = [
"https://regulatory-spin-wooden-albuquerque.trycloudflare.com/auth/callback",
"https://regulatory-spin-wooden-albuquerque.trycloudflare.com/auth/shopify/callback",
"https://regulatory-spin-wooden-albuquerque.trycloudflare.com/api/auth/callback"
]
[pos]
embedded = false
Here is the toml file, I think this is correct.