You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/webhooks.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,15 +62,23 @@ After your handlers are loaded, you need to register which topics you want your
62
62
63
63
In your OAuth callback action, you can use the `Shopify\Webhooks\Registry::register` method to subscribe to any topic allowed by your app's scopes. This method can safely be called multiple times for a shop, as it will update existing webhooks if necessary.
64
64
65
+
### EventBridge and PubSub Webhooks
66
+
67
+
You can also register webhooks for delivery to Amazon EventBridge or Google Cloud Pub/Sub. In this case the `path` argument to `Registry::register` needs to be of a specific form.
68
+
69
+
For EventBridge, the `path` must be the [ARN of the partner event source](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_EventSource.html).
70
+
71
+
For Pub/Sub, the `path` must be of the form `pubsub://[PROJECT-ID]:[PUB-SUB-TOPIC-ID]`. For example, if you created a topic with id `red` in the project `blue`, then the value of `path` would be `pubsub://blue:red`.
72
+
65
73
The parameters this method accepts are:
66
74
67
-
| Parameter | Type | Required? | Default Value | Notes |
68
-
|---|---|:---: |:---: |---|
69
-
|`path`|`string`| Yes | - | The URL path for the callback. If using EventBridge, this is the full resource address.|
70
-
|`topic`|`string`| Yes | -| The topic to subscribe to. May be a string or a value from the Topics class. |
71
-
|`shop`|`string`| Yes | - | The shop to use for requests. |
72
-
|`accessToken`|`string`| Yes | - | The access token to use for requests. |
73
-
|`deliveryMethod`|`string`| No |`Registry::DELIVERY_METHOD_HTTP`| The delivery method for this webhook. |
75
+
| Parameter | Type | Required? |Default Value | Notes|
0 commit comments