app webhook triggercommand
Triggers the delivery of a sample Admin API event topic payload to a designated address.
You should use this command to experiment with webhooks, to initially test your webhook configuration, or for unit testing. However, to test your webhook configuration from end to end, you should always trigger webhooks by performing the related action in Shopify.
Because most webhook deliveries use remote endpoints, you can trigger the command from any directory where you can use Shopify CLI, and send the webhook to any of the supported endpoint types. For example, you can run the command from your app's local directory, but send the webhook to a staging environment endpoint.
To learn more about using webhooks in a Shopify app, refer to Webhooks overview.
Limitations
- Webhooks triggered using this method always have the same payload, so they can't be used to test scenarios that differ based on the payload contents.
- Webhooks triggered using this method aren't retried when they fail.
- Trigger requests are rate-limited using the Partner API rate limit.
- You can't use this method to validate your API webhook subscriptions.
Anchor to flagsFlags
The following flags are available for the app webhook trigger
command:
The URL where the webhook payload should be sent. You will need a different address type for each delivery-method: · For remote HTTP testing, use a URL that starts with https:// · For local HTTP testing, use http://localhost:{port}/{url-path} · For Google Pub/Sub, use pubsub://{project-id}:{topic-id} · For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:
The API Version of the webhook topic.
The Client ID of your app.
Your app's client secret. This secret allows us to return the X-Shopify-Hmac-SHA256 header that lets you validate the origin of the response that you receive.
Method chosen to deliver the topic payload. If not passed, it's inferred from the address.
This help. When you run the trigger command the CLI will prompt you for any information that isn't passed using flags.
The path to your app directory.
Reset all your settings.
Deprecated. Please use client-secret.
The requested webhook topic.
The name of the app configuration.