Field
Type
Required
Description
method
String
Yes
"sendMessage"
chat_id
String
Yes
Unique identifier for the target Chat or User_id.
text
String
Yes
Text to send
disable_web_page_preview
Boolean
Optional
Disables link previews for links in this message.
disable_notification
Boolean
Optional
Sends the message silently; users will receive a notification with no sound.
reply_to_message_id
String
Optional
Unique identification for the original parent message if the message is a reply.
reference
Long
Yes
Unique local identifier for the message.
to_user_id
String
Optional
Unique identifier of the target user, if the user replies or sends a message to the target user, will be displayed within a Group or Channel.
echo
Integer
Optional
1= of sent message
menu_ref
String
Optional
Menu reference for an existing predefined menu: The menu will be displayed as an inline menu associated with the message.
inline_menu
Array of Menu
Optional
Inline menu object to hold menus: If both inline_menu and menu_ref are defined, the priority goes to inline_menu.
chat_settings
Integer
Optional
1: if you want to send to bot chat settings

Requests

json
{ "method": "sendMessage", "chat_id": "90090684362164813", "reference": 60913400130229, "text": "hello world" }
java
String chatId = "1232342342134234"; String text = "hello world"; api.sendText(chatId, text);
javascript
let chatId = "1232342342134234"; let text = "hello world"; api.sendText(chatId, text);
python
napi.send_text(chat_id="chatId", text="Message", reference=Utils.get_unique_id())

Response

json
{ "method":"message", "message":{ "date":1721554104034, "reference":1230, "gmid":"63", "from_admin":1, "chat":{ "id":"90090684491334028", "title":"z", "type":"Group" }, "message_id":"d1_CxBsQuro126288", "style":0, "from":{ "name":"Adam", "id":"90089586341121118", "terminal":"Mobile", "type":"Contact", "version":"('0n1a','1lVh','2KX8','3Qwf')" }, "text":"hello", "type":"text" } }

Powered by Notaku