Teams botframework send proactive message REST api

走远了吗. 提交于 2021-02-11 12:33:01

问题


I Try to create new converation and send proactive message with teams bot (botfreamwork).

I used this document to do that.

I POST to : SERVICE_URL/v3/conversations/

BODY:

{
  "bot": {
    "id": BOT_ID
  },
  "members": [
    {
      "id": USER_ID
    }
  ],
  "channelData": {
    "tenant": {
      "id": TENANT_ID
    }
  }
}

BOT_ID - I put the app id of the bot (with a prefix of "28:")

USERֹ_ID - I copied the USER_ID from a message I received from the user (not in a proactive message)

TENANT_ID - I took the tenant id from the link of the teams

I get this error:

{
    "error": {
        "code": "BadSyntax",
        "message": "Invalid user identity in provided tenant"
    }
}

I made several attempts to change the user ID: I changed to a user that appears in ADD, I changed with a prefix of 29: and without a prefix of 29: - nothing helped, this error continues to appear.

What am I missing?

来源:https://stackoverflow.com/questions/62929651/teams-botframework-send-proactive-message-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!