我想向不属于任何机器人或群组的私人用户发送消息。我如何发送?
预先感谢
答案 0 :(得分:0)
线路具有要发送给一个私人用户的API。
curl -v -X POST https://api.line.me/v2/bot/message/push \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {channel access token}' \
-d '{
"to": "U4af4980629...",
"messages":[
{
"type":"text",
"text":"Hello, world1"
},
{
"type":"text",
"text":"Hello, world2"
}
]
}'
请参阅文档:https://developers.line.biz/en/reference/messaging-api/#send-push-message