Webhooks let your app connect to APIs and listen for different events from within the API. For example, your app can get notified whenever someone creates a new commit on GitHub, sends a message on Slack, or sends you a message on Facebook Messenger.
RapidAPI Webhooks lets you easily connect to different Webhooks. By using RapidAPI, you don't need to create a publicly accessible endpoint for the webhooks to reach, meaning:
You can also see which packages have webhooks avaliable by going to RapidAPI and looking for any package that has a Webhooks tag on it.
Fig 1. Webhook enabled package
Once you select an API that you want to use, you'll be redirected to an overview screen where, you should see all the webhook functions the API supports. Clicking on a webhook function will take you to it's docs, which will have all the steps needed to connect to it.
In the rightmost panel of the function docs, you'll have a code snippet that you can copy in to your app. The function in that code snippet will get called whenever that event happens. (Don't forget to download the SDK for your preferred language!)
You can also use the Test Event button to test the Webhook connection in your code. That button will fire up a fake event, so that you can see if your app is actually connected properly. Simply copy the code snippet into your application, run your application, and press the Test Event button. No setup necessary!
Once you've found the event you would like to listen for and tested that it works, follow the steps provided on how to setup the webhook (note: it's important to use the provided URL as a callback), and you're ready to go! Also, it's important that you provide the required parameters for that event. The documentation will walk you through all of the required setup that is specific to each webhook.
Updated 5 months ago