Commands › Chat & messages
reply_dialog
Press a button on a script dialog
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "reply_dialog",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"channel": "-12345",
"button": "Yes",
"object": "9f8e7d6c-5b4a-4321-8fed-000000000000",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
channelinteger | yes | Dialog channel, from the script_dialog webhook event (chat_channel). |
buttonstring | yes | Label of the button to press. |
objectUUID | no | Object that showed the dialog (object_uuid from the event). Send it — some scripts need it. |
Example response
{
"result": "OK",
"reply": "Yes"
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- The bot does not check that a dialog is actually open.