Tim Cadenbach
Tim Cadenbach

Reputation: 1565

MS Teams not accepting task module payload

while trying to use the developer preview tasks module i got a strange issue.

Teams isn't showing my module, always telling me this in console:

<BotError>Error when processing invoke response: Payload is incorrect, field is in the wrong format: task.value

What I'm sending is this:

{
    "task": {
        "value": {
            "url": "https://<ourbaseserviceurl>",
            "title": "Microsoft Ignite 2018 Vision Keynote",
            "height": 700,
            "width": 1000,
            "fallbackUrl": "<ourbaseserviceurl"
        },
        "type": "message"
    }
}

Was trying to use the sample but even that doesn't seem to work properly atm. The URL is in allowedurls for the app and the same we use to communicate with the bot which is in general working fine.

Upvotes: 1

Views: 1355

Answers (1)

Wajeed Shaikh
Wajeed Shaikh

Reputation: 3158

Please set the task type as continue while passing TaskInfo object. Here is the documentation.

{
    "task": {
        "type": "continue"
        "value": {
            "url": "https://<ourbaseserviceurl>",
            "title": "Microsoft Ignite 2018 Vision Keynote",
            "height": 700,
            "width": 1000,
            "fallbackUrl": "https://<ourbaseserviceurl>"
        },
    }
}

Here is how you display the value in a popup message box:

{
  "task": {
    "type": "message",
    "value": "Message text"
  }
}

Please try and let us know if you face any issue.

Upvotes: 1

Related Questions