Skip to main content

Bots Overview

A bot is a Diyalog user that your own systems control. Your backend sends messages to customers through the bot, and the bot reports back what happened to those messages: sent, delivered, read, and the customer's replies.

Typical uses:

  • One-time passwords (OTP / MOK) shown in the app instead of SMS
  • Notifications and campaign messages
  • Messages with buttons that the customer answers, such as approving or rejecting a transaction

How it works#

  1. An admin creates the bot in the admin panel and gets the bot's API URL, which contains the bot's access token. See Create a bot.
  2. Your backend sends messages with the Messaging API, using that URL.
  3. If the bot has a webhook, Diyalog posts message events and customer replies to your service. See Webhooks.
Your backend ──(Messaging API)──▶ diyalog-server ──▶ customer's app
▲ │
└────────(webhook events)──────────┘

Where to go next#

I want to…Read
Create a bot and set up its webhookCreate a bot
Send text, template or OTP messagesMessaging API
Receive delivery, read and reply eventsWebhooks
Keep the access token secret

Anyone who has a bot's API URL can send messages as that bot. Store it like a password, on your backend only, never in a mobile or web app.