首页 > 解决方案 > 微软团队 GraphAPI 返回错误

问题描述

我在从我们的Graph API 应用程序中点击 POST API(发送消息,创建频道)时遇到问题。

第一个请求是创建频道:请求 URL:https://graph.microsoft.com/v1.0/teams/id/channels

帖子正文: {:displayName=>"new channel", :description=>"description"}

标头还包括收到的授权 API 错误中的不记名令牌: {:code=>"BadRequest", :message=>"channel cannot be null.\r\nParameter name: channel", :innerError=>{:date=>"2020-06-24T12:40:33", :"request-id"=>"be91ce7b-0"}}

我遵循的文档:https://docs.microsoft.com/en-us/graph/api/channel-post?view=graph-rest-1.0&tabs=http

第二个请求是向频道发送消息:

请求网址:https://graph.microsoft.com/v1.0/teams/bc71-8b158cc3b3/channels/19:ec73841@thread.skype/messages

帖子正文:

{:body => {:contentType=>"html", :content=>"Tesing message from graph api"}}

标头还包括来自授权 API 的不记名令牌

收到错误: {:code=>"InternalServerError", :message=>"Failed to execute request.", :innerError=>{:date=>"2020-06-24T12:42:01", :"request-id"=>"ed601c89-f0bd3"}}

我遵循的文档:https ://docs.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0&tabs=http

标签: microsoft-graph-apimicrosoft-teamsmicrosoft-graph-teams

解决方案


推荐阅读