Teams botframework send proactive message REST api

425 Views Asked by At

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?

0

There are 0 best solutions below