Amplify Platform

Debug Amplify webhook integration issues

Debug Amplify Webhook Integration Issues

As described here, webhooks are an integral part of how you integrate with Amplify Central. They enable you to trigger an external application to perform a custom operation, such as tie into a business approval process or modify an Amplify resource.

Some examples of Integration Webhooks are described below:

This blog post outlines some techniques for debugging Amplify Webhook integration issues.

For example, it describes how to debug when an integration webhook is not triggering your custom flow, whether it is a subscription flow or access request flow or any custom flow.

The basic steps are as follows:

  • Use a service like webhook.site to make sure that Amplify is firing the webhook and that you’ve setup your integration webhook properly
  • Use Curl or Postman to make sure that your flow is responding and working using a sample webhook payload

Make sure your webhook is configured and firing

If your application is not triggering, then perhaps the Amplify webhook is not configured properly.

Here are several things you should look at:

  • Ensure that you have configured the correct resource hook trigger kind and type corresponding to the desired event
spec:
  triggers:
    - group: catalog
      kind: Subscription
      name: "*"
      type:
      - updated

Note that the resource hook trigger above sets a trigger event for any (*) Marketplace Product Subscription status update.

Make any necessary modifications, apply your changes and try again.

axway central apply -f marketplace-product-subscription-request-integration.yaml
  • If you feel that your resource hook trigger is correct, and the problem persists, the next thing you can do is leverage a service like webhook.site and use that URL for your webhook URL. This will eliminate your external application from the debugging temporarily until we can figure out where the problem may be.

Modify your YAML and use the webhook.site URL

spec:
  enabled: true
  url: https://webhook.site/f1bc.......69aa63
  headers:
      Content-Type: application/json

Apply your changes and try to trigger the event again.

axway central apply -f marketplace-product-subscription-request-integration.yaml

If your resource hook and webhook are setup properly then you should see webhook calls to webhook.site.

If not, then you are not triggering your event or your resource hook and webhook are not setup properly or you have discovered a bug and should report it.

Make sure your application/workflow is responding and working properly

You should have a Postman API or Curl command to trigger your application/workflow that can be used during development of your application so that you don’t have to recreate the steps required to trigger the Amplify event (e.g. subscribe to a Marketplace Product or request Access to an Asset).

  • Use the webhook payload from webhook.site (see above) and use test your application from Postman/Curl
  • If this works, then you should compare this URL to the one in your Amplify integration YAML file
  • If this doesn’t work, then you probably have a problem calling your application and should figure it out until you can trigger from Postman/Curl

Summary

This blog post described some techniques for debugging Amplify Webhook integration issues.

Need help with API Builder? Extend your skills with Axway University.