Guides
Virtual orchestration
Value-add: send as a dispatchable group member (off by default; apply for access).
When to use
On an authorized bot, list dispatchable members with listChatVirtualMembers, then send text / photo / document / audio / video / location as that member via simulateSendMessage. Every call is audited.
Access
- Admin must enable
allow_virtual_user_operationon the bot. - The bot must be an active group member; the virtual member must be active and in the group.
- Otherwise APIs return
403.
Steps
GET /api/v1/bots/listChatVirtualMembers?chat_id=…→virtual_user_id.- For media, obtain
file_idvia the files guide. POST /api/v1/bots/simulateSendMessagewithchat_id,virtual_user_id, and type-specific fields.
Example
curl -X POST "$API/bots/simulateSendMessage" \
-H "Authorization: Bearer $SOCHAT_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "<chat_id>",
"virtual_user_id": "<virtual_user_id>",
"type": "text",
"text": "Sent as a dispatchable member"
}'
Limits
- Default
typeistext; media types need a validfile_id. - Both Node and Java SDKs wrap these methods.
Next
Orchestration API · Files · Chat read (getMyChats).
