Skip to main content

Create a Bot

Bots are created and managed in the admin panel. You need an admin account with access to the Bot Kullanıcı Listesi (Bot list) menu.

The screenshots show the admin panel in Turkish. English labels are given in brackets.

1. Open the bot list#

In the left menu, open Bot Kullanıcı Listesi (Bot list). You see the existing bots. Click a bot to edit it, or click Yeni Bot Ekle (Add New Bot) to create one.

Bot list in the admin panel

2. Enter the general settings#

The Genel (General) tab opens.

General tab of a new bot

FieldDescription
Bot Adı (Bot Name)Name customers see as the sender of the messages.
Kullanıcı Adı (UserName)Unique user name of the bot. It is also sent as entry.id in every webhook request, so one webhook can serve several bots.
MOK Mesajı İmaj URL (Default OTP Message Image URL)Image shown in OTP (MOK) messages when the request does not set one.

3. Choose how events are delivered#

Under Webhook Servis Detayları (Webhook service details), pick the service type:

TypeWhen to use
WebHookDiyalog posts events as JSON to your HTTPS endpoint. This is the usual choice.
SOAPDiyalog calls a SOAP service in a contract agreed with Diyalog. Only for existing SOAP integrations.
NoneThe bot only sends messages. No events are delivered.

When you select WebHook, more fields appear:

Webhook settings of a bot

FieldDescription
Webhook UrlBase URL of your service. Diyalog appends /webhook, so https://webhook.example.com/otpReceiver receives events at https://webhook.example.com/otpReceiver/webhook.
Uygulama Gizli Anahtarı (Application Secret Key)Secret used to sign each request. Your service checks the X-Signature header with it. See Verify the signature. Use a long random value.

Under Webhook'a dönülmesi istenen mesaj durumları (Message statuses sent to the webhook), select the events you want:

CheckboxWebhook eventSent when
Mesajlar (Messages)MessagesThe customer replies to the bot or presses a button
Teslim (Delivery)MessageDeliveriesThe message reaches the customer's device
Okuma (Read)MessageReadsThe customer reads the message
Gönderme (Sent)MessageEchoesThe bot's message is sent

Click Kaydet (Save). The other tabs become available after the bot is saved.

4. Set an avatar (optional)#

On the Avatar Resmi (Avatar Photo) tab, click Profil resmini değiştir (Change profile picture) to upload the image customers see next to the bot's messages.

Avatar tab of a bot

5. Copy the API URL#

The Bot API Bilgileri (Bot API Info) tab shows the bot's API URL:

API info tab of a bot

https://<DIYALOG-SERVER-API-ENDPOINT>/v1/bots/hooks/<API NAME>/<BOT-ACCESS-TOKEN>

Replace <API NAME> with the Messaging API method you call:

<API NAME>Use
sendmessageSend a message
sendmokSend a one-time password

Give this URL only to the backend team that sends the messages. The last part of it is the bot's access token.

Change a bot#

Click the bot in the list, change the fields, and click Güncelle (Update).