Home

Getting error when sending an adaptive card

%3CLINGO-SUB%20id%3D%22lingo-sub-805773%22%20slang%3D%22en-US%22%3EGetting%20error%20when%20sending%20an%20adaptive%20card%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-805773%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BWhen%20trying%20to%20send%20an%20adaptive%20card%20in%20MS%20Teams%20Channel%20as%20per%20example%20given%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbot-service%2Fnodejs%2Fbot-builder-nodejs-send-rich-cards%3Fview%3Dazure-bot-service-3.0%26amp%3BviewFallbackFrom%3Dazure-bot-service-4.0%23send-an-adaptive-card%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E%2C%20I'm%20getting%20a%20bad%20request%20error%20something%20like%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EError%3A%20POST%20to%20'%3CA%20href%3D%22https%3A%2F%2Fsmba.trafficmanager.net%2Famer%2Fv3%2Fconversations%2Fxxxxx%2Factivities%2Fyyyy%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsmba.trafficmanager.net%2Famer%2Fv3%2Fconversations%2Fxxxxx%2Factivities%2Fyyyy%3C%2FA%3E'%20failed%3A%20%5B400%5D%20Bad%20Request%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20Bot%20console%20for%20MS%20Teams%20channel%2C%20I%20see%20this%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127053i55B4F98C4052B5BD%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInteresting%20when%20testing%20the%20bot%20via%20Web%20Chat%20channel%20or%20Emulator%2C%20the%20card%20is%20sent%20%3CU%3Ejust%20fine%3C%2FU%3Ebut%20not%20on%20MS%20Teams.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20building%20card%20by%20copying%20and%20pasting%20the%20code%20given%20in%20the%20above%20link%2C%20the%20card%20seems%20to%20be%20sent%20okay%20on%20MS%20Teams%20but%20it%20is%20shown%20as%20undefined%20in%20the%20MS%20Teams%20as%20the%20below%20screenshot%20shows%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20316px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127055i053A48EEE981F8F7%2Fimage-dimensions%2F316x40%3Fv%3D1.0%22%20width%3D%22316%22%20height%3D%2240%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%20what%20might%20be%20going%20on%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20reinstalled%20the%20botbuilder-teams%20npm%20package%20but%20the%20problem%20persists.%20The%20bot%20is%20hosted%20on%20my%20local%20machine%20using%20ngrok.%20Currently%20I'm%20using%20the%20bot%20in%20a%201-to-1%20conversation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20and%20regards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-805773%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBot%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-808179%22%20slang%3D%22en-US%22%3ERe%3A%20Getting%20error%20when%20sending%20an%20adaptive%20card%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-808179%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F386475%22%20target%3D%22_blank%22%3E%40NKM122205%3C%2FA%3E%26nbsp%3B-%20Could%20you%20please%20add%26nbsp%3B%3CSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%22version%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3A%20%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3CSTRONG%3E%221.0%22%3C%2FSTRONG%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20card%20and%20check%20if%20it%20is%20working%20for%20you%3F%20Please%20take%20a%20look%20at%20%3CA%20href%3D%22https%3A%2F%2Fadaptivecards.io%2Fsamples%2FCalendarReminder.html%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Esample%20card%20here%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-809122%22%20slang%3D%22en-US%22%3ERe%3A%20Getting%20error%20when%20sending%20an%20adaptive%20card%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-809122%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F79135%22%20target%3D%22_blank%22%3E%40Wajeed%20Hanif%20Shaik%3C%2FA%3E%26nbsp%3BThank%20you%20very%20much!%20That%20was%20the%20missing%20part.%20It%20is%20working%20now.%20The%20referred%20code%20sample%20in%20the%20original%20link%20does%20not%20have%20the%20version%20in%20there%20and%20so%20probably%20needs%20to%20be%20updated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20and%20regards%3C%2FP%3E%3C%2FLINGO-BODY%3E
NKM122205
Occasional 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 Hanif Shaik 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

Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies