cURL
Text Message
curl --request POST \ --url http://localhost:5300/api/v1/platform/bots/{bot_uuid}/send_message \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "target_type": "group", "target_id": "123456789", "message_chain": [ { "type": "Plain", "text": "Hello, World!" } ] } '
{ "code": 0, "msg": "ok", "data": { "sent": true } }
Send a message to a specific target via the specified bot
API Key authentication using X-API-Key header. Example: X-API-Key: lbk_your_api_key_here
X-API-Key: lbk_your_api_key_here
Bot UUID
Target type
person
group
Target ID (user ID or group ID)
Message chain (array of MessageComponent)
Message sent successfully
0
"ok"
表示 子属性