我想发送消息,图像…使用skype BOT API。如果有其他可用的NPM进行skype聊天
参考如何从docs
获取访问令牌https://azure.microsoft.com/en-us/documentation/articles/active-directory-v2-protocols-oauth-code/
然后使用这个令牌,我将尝试使用以下请求发送消息
参考文档:
https://docs.botframework.com/en-us/skype/chat/navtitle
conversationId: 29: f2ca6a4a - 93 - bd - 434 - 5 - 9 - ca5 f81f8f9b455
request({
url: 'https://api.skype.com/v3/conversations/29:f2ca6a4a-93bd-434a-9ca5-5f81f8f9b455/activities',
method: "POST",
json: true,
headers: {
Authorization: ' Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjIifQ.eyJpYXQiOjE0NzMzMTk4MDEsImV4cCI6MTQ3MzQwNjqwqwqwqwt5cGVpZCI6ImFtdF8wNjIiLCJzY3AiOjk1OCwiY3NpIjoiMCIsImNpZCI6ImVhODhhYWFmMmFkMjYwYzEiLCJhYXQiOjE0NzMzMTk4MDF9.ZrC0weALCz7QbUHFslJZD7L16k_ciFSCNY-q29h99x70qNrpB5e71KYrD18FTZ-3tI8Ck37_91yMHleQZvEziyEq5-t9EOaGM32RiF0iwnKZcbkOkvgqofWmcGdPT63HEyjWBHg3e_NLIE-RnDob4vMCQrHTkqmuQq6cVaIDkjke1Yi4xjONUNIB9QpWmpuRju0Kxi7oIJqiHWQK',
'Content-Type': 'application/json'
},
body: {
"type": "message/text",
"text": "Hi! (wave)"
}
}
But got error:
{ status: { code: 40499, text: 'No handler found for resource' } }
如何获取conversationId?
您正在寻址不同的域。url应该https:// .skype.com/v3..。