Where to get the URL link for webhook?

How to set up a webhook URL to receive real-time data from our API

To set up a webhook URL, you'll need to configure a server endpoint that can handle incoming HTTP requests from our API. This allows your application to receive real-time data, such as message updates, directly from WhatsApp.

Setting Up a Webhook on a Hosting Platform

You can set up a webhook on any server that can handle HTTP requests

  1. Check the Platformโ€™s Documentation: Most hosting services, even small ones, offer a way to handle HTTP requests. You should look for documentation or tutorials on how to set up a web application or endpoint on your hosting platform.

  2. Create the Webhook Script: As with any server, you need to create a script that can handle HTTP POST requests. This script will be responsible for processing and responding to incoming data from the webhook. We have written more about this in the articles here: Receive messages

  3. Deploying the script: Once the script is ready, it needs to be uploaded to the hosting platform. Depending on the platform, this could be uploading via FTP, using a version control system such as Git, or other deployment tools provided by the hosting service.

  4. Get a public URL: Once the script is running on the hosting platform, the platform should provide a public URL for the deployed endpoint. This URL is what you will use as the URL of the webhook.

  5. Test the webhook: Before using the webhook in production, it is worth testing it to make sure that it works correctly and that the platform handles requests correctly. We've written about how to do this here: How to test Webhook functionality?


You can use popular cloud platforms to get a webhook link. Below, we provide instructions for setting up a webhook on three popular platforms โ€” Firebase, AWS, and Heroku.

Firebase

Firebase offers Cloud Functions functionality, allowing you to run your bot without worrying about server infrastructure. In our opinion, this is the most optimal option.

  1. Create a project in Firebase Console;

  2. Install Firebase CLI, following the instructions;

  3. Initialize Firebase in your project directory with the command firebase init;

  4. Deploy your bot using the command firebase deploy --only functions.

AWS (Amazon Web Services)

AWS Lambda offers the ability to run code in response to triggers from other AWS services, making it a good choice for a bot.

  1. Register or log in to AWS Management Console;

  2. Create a new Lambda function through the AWS console, selecting API Gateway as the trigger;

  3. Upload your bot's code into the Lambda function;

  4. Configure the API Gateway to interact with your bot and the outside world.

Heroku

Heroku offers an easy-to-use platform for hosting applications, which can automatically deploy code from your Git repository.

  1. Create an account on Heroku;

  2. Install Heroku CLI and log in;

  3. Create a new Heroku app through the console or using the command heroku create;

  4. Link your Git repository to Heroku and perform deployment with the commands git push heroku master;

  5. Set the webhook URL provided by Heroku

How do I check if callbacks are being sent from a channel?

Especially for this purpose, we offer you a special endpoint that allows you to simulate any callback on any event. Thus, you can check if your link is available for our API, as well as see the format of the callback itself.

Last updated