Skip to content

Webhooks config issue in shopify.app.toml #5505

Description

@Xmaster6y

TL;DR

Impossible to deploy a config with /webhooks URI or with both compliance and regular topics.

The Problems

/webhooks

The config I'm used to use:

[webhooks]
api_version = "2025-01"

  [[webhooks.subscriptions]]
  topics = [ "app_subscriptions/update", "app/uninstalled" ]
  uri = "/webhooks"
  compliance_topics = [ "customers/data_request", "customers/redact", "shop/redact" ]

Yields the error:

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  App configuration is not valid                                              │
│  Validation errors in shopify.app.dev.toml:                                  │
│                                                                              │
│  • [webhooks.subscriptions.0.uri]: URI isn't correct URI format of           │
│  https://, pubsub://{project}:topic or Eventbridge ARN                       │
│                                                                              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Https

The config:

[webhooks]
api_version = "2025-01"

  [[webhooks.subscriptions]]
  topics = [ "app_subscriptions/update", "app/uninstalled" ]
  uri = "https://programming-neighbor-we-transmit.trycloudflare.com/webhooks"
  compliance_topics = [ "customers/data_request", "customers/redact", "shop/redact" ]

Yields the error:

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Version couldn't be created.                                                │
│                                                                              │
│  webhooks                                                                    │
│                                                                              │
│  Validation errors                                                           │
│    • Unexpected key(s) were found.                                           │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

same for:

[webhooks]
api_version = "2025-01"

  [[webhooks.subscriptions]]
  topics = [ "app_subscriptions/update", "app/uninstalled" ]
  uri = "https://programming-neighbor-we-transmit.trycloudflare.com/webhooks"

  [[webhooks.subscriptions]]
  uri = "https://programming-neighbor-we-transmit.trycloudflare.com/webhooks"
  compliance_topics = [ "customers/data_request", "customers/redact", "shop/redact" ]

What works

The configs that work:

[webhooks]
api_version = "2025-01"

  [[webhooks.subscriptions]]
  uri = "https://programming-neighbor-we-transmit.trycloudflare.com/webhooks"
  compliance_topics = [ "customers/data_request", "customers/redact", "shop/redact" ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions