python - 此请求的授权已被拒绝(Skype REST API)
问题描述
晚上好,社区专家。
我正在使用 REST API (Bot Framework) 将我的应用程序与 Skype 集成。直到今天,一切都运行良好。早上,在检查应用程序的功能时,我注意到 Skype 中没有显示机器人的响应。我决定通过«Postman»发送消息,并收到以下回复:
{
"message": "Authorization has been denied for this request."
}
我认为令牌可能有问题。通过下面的请求,我得到了一个新的,但它没有帮助:
curl -k -X POST https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token -d "grant_type=client_credentials&client_id=<APP ID>&client_secret=<APP PASWORD>&scope=https%3A%2F%2Fapi.botframework.com%2F.default"
这是我的 «Postman» POST HTTPS 查询设置:
URL:
https://smba.trafficmanager.net/apis/v3/conversations/<CONVERSATION ID>/activities/<MESSAGE ID>
HEADERS:
Postman-Token: <calculated when request is sent>
Content-Lenght: <calculated when request is sent>
Host: <calculated when request is sent>
Content-Type: application/json
Authorization: Bearer 0SzRndyIsImtpZCI6ImppYk5ia0ZTU2JteFBZck45Q0...
BODY:
{
"type": "message",
"from": {
"id": <BOT ID>,
"name": <BOT NAME>
},
"recipient": {
"id": <USER ID>,
"name": <USER NAME>
},
"text": <MESSAGE>
}
请告诉我可能是什么问题?昨天一切正常!SSL证书可能有问题吗?还是应该以其他方式传递 Authorization 参数?先感谢您!
解决方案
推荐阅读
- reactjs - 如果没有管理员角色,如何在 Nextjs 中保护客户端的路由并重定向?
- visual-studio-code - 编辑 VSCode JSON 设置而不是 Gui 设置
- reactjs - 你如何构建一个网络应用程序?
- r - 删除绘图中的自动标题 (R)
- reactjs - 无法从 API 中提取数据并在 React 中绘制数据
- javascript - d3.js 中的补间文本 - 向上计数
- reactjs - 取消选中并选中 ag-Grid 中 columnsMenuTab(列列表)中某些列的复选框
- micronaut - Micronaut @Controller 通配符
- angular - Laravel Passport API 在开发过程中切换用户
- c++ - 使用向量为每位玩家发 5 张牌