Getting error when sending an adaptive card

Copper Contributor

Hi,

  

     When trying to send an adaptive card in MS Teams Channel as per example given here, I'm getting a bad request error something like:

 

Error: POST to 'https://smba.trafficmanager.net/amer/v3/conversations/xxxxx/activities/yyyy' failed: [400] Bad Request

 

On Bot console for MS Teams channel, I see this error:

 

clipboard_image_0.png

 

Interesting when testing the bot via Web Chat channel or Emulator, the card is sent just fine but not on MS Teams.

 

When building card by copying and pasting the code given in the above link, the card seems to be sent okay on MS Teams but it is shown as undefined in the MS Teams as the below screenshot shows:

 

clipboard_image_1.png

 

Any ideas what might be going on?

 

I have reinstalled the botbuilder-teams npm package but the problem persists. The bot is hosted on my local machine using ngrok. Currently I'm using the bot in a 1-to-1 conversation.

 

Thanks in advance and regards

 

 

2 Replies

@NKM122205 - Could you please add "version": "1.0" in the card and check if it is working for you? Please take a look at sample card here.

@Wajeed-MSFT Thank you very much! That was the missing part. It is working now. The referred code sample in the original link does not have the version in there and so probably needs to be updated.

 

Thanks again and regards