简体   繁体   English

我想使用 Microsoft Teams HTTP 请求在聊天中发送消息。 如何获取我的 TeamsID 和 ChannelID

[英]I want to use Microsoft Teams HTTP request that sends a message in chat. How do I get my TeamsID and ChannelID

As the title says I want to create messages in our teams channel via HTTP Calls.正如标题所说,我想通过 HTTP 呼叫在我们的团队频道中创建消息。 This is the documentation I am referring to https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http这是我指的文档https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http

It says that I have to do a request like this: POST /teams/{team-id}/channels/{channel-id}/messages它说我必须执行这样的请求:POST /teams/{team-id}/channels/{channel-id}/messages

But I have no clue how to get those ID's.但我不知道如何获得这些 ID。 Can somebody please guide me?有人可以指导我吗?

Best regards,最好的祝福,

Stan斯坦

I've tried to copy the invitation link and somehow deduce from the link which part is which ID, but I could not figure it out.我试图复制邀请链接并以某种方式从链接中推断出哪个部分是哪个 ID,但我无法弄清楚。

you can find these IDs by following these steps.您可以按照以下步骤找到这些 ID。 Please click the picture to check the details:请点击图片查看详情:

  1. Find your channel in Teams and get links to channel: picture 1在 Teams 中找到您的频道并获取频道链接:图片 1

  2. String after "channel/" is ChannelId: picture 2 “channel/”后面的字符串是ChannelId:图2

  3. String after "groupId=" is TeamId: picture 3 “groupId=”后的字符串是TeamId:图3

Hope they work for you.希望他们为你工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当机器人在 Teams 中发送消息时,我如何获得通知? - How do I get notifications when a bot sends a message in Teams? 如何让我的机器人向Microsoft Teams频道发布消息? - How can I get my bot to post a message to a Microsoft Teams channel? 如何本地化Microsoft Teams bot欢迎消息? - How can I localize my Microsoft Teams bot welcome message? 如何使用团队机器人获取聊天组名称? - How do I get the chat group name with a teams bot? 如何将用户添加到 FAQ Plus 聊天机器人作为 Microsoft Teams 中的代理 - How do I add a user to an FAQ Plus Chat Bot as an agent in Microsoft Teams Microsoft团队:如何设置聊天消息的作者? - Microsoft Teams: How to set the author of a chat message? 如何格式化 JSON 数据以使用 POSTMAN 或 PHP ZC14BEF32931687D5CE9Z 以表格格式向 Microsoft Teams 发送消息 - How do I format JSON data to send message in a table format to Microsoft Teams using POSTMAN or PHP cURL 如何禁用 Microsoft Teams Bot 中的消息推荐 - How can I disable message recommendations in Microsoft Teams Bot 我希望与microsoft团队垂直显示按钮 - I want to display the button vertically with microsoft teams 如何在我的Microsoft团队自定义应用程序中重定向到另一个页面? - How do I redirect to another page in my custom app for Microsoft Teams?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM