Jan 27 2020 01:20 PM
I have a dotnet core web api that receives an action from an incoming web hook. It is an HTTP Post action on the web api that does some work and I want to reply to the message card using the refresh card.
[HttpPost]
public async Task<ActionResult> Post()
{
// do work here, validate, etc.. perform action
Response.ContentType = "application/json; charset=utf-8";
Response.Headers.Add("CARD-ACTION-STATUS", "Plan is being created.");
Response.Headers.Add("CARD-UPDATE-IN-BODY", "true");
return Ok();
}
When I do this on the controller action, the Teams message card from the incoming web hook reads:
Failed to send
Plan is being created.
So I can tell Teams is getting the refresh data to update the card body but its not doing it and I cannot seem to figure out why.
Jan 28 2020 07:52 AM
SolutionFixed this by posting a JSON card back with the refresh card headers.
Apr 22 2021 07:19 PM
Nov 17 2021 02:39 PM