Table of Contents

How to create an API chat bot and set up the Hook Url

Ilaria Scuotto Updated by Ilaria Scuotto

With an API Chat bot, you would be able to create visually in our builder the main logic. Once is created the bot in builder, in the Channels section, you will set up the Hook Url, where all the events and messages, will be posted.

Create API Chat bot

  1. Go to the main Dashboard and click "Build a Chatbot", and select "API CHANNEL"

After this, the builder will display. Set a name and save it.

Set the Hook URL

  1. Go the Channels section and click on API.
  2. Click on the right side corner "CREATE A NEW CHANNEL"
  3. A new screen will be displayed,
  4. Introduce the Channel name, that is private and only for you, you can also change it later

  5. Introduce the Hook URL, where all the messages and events will be send via POST REQUESTS.

You can have more than one Hook Url:

  1. Once is done, press CONFIRM

  1. Once is confirmed an Auth Token gill be generated below:

And also, you will see a new tab called "Linked Bot", press it

  1. Here is where you will select the API chat bot you created in the Dashboard, bear in mind you can only select an APIchat bot:

Confirm the selection, and that's it.

Hook requests

Here is an example of how the requests will come in case is a message:

For more information please check here:

Send Message to this API Chat bot

Here is an example of the Request needed:

For more information:

The Auth token needed to send message, is the one generated earlier in the Channel:

The API Platform

In case you want to control other elements of the bot, from variable to assignations, please check here:

Note: The url where this section indicated the channel id:

In this case this will be the 483663

The Auth token to use the platform API is the one in the Accounts section

How did we do?