Sharvani
Sharvani

Reputation: 111

Redirecting to Bot from URL

I am working on a .Net core Bot application where I have created an adaptive card and when user clicks it would be redirected to a new URL. Once, redirected I want to add a functionality that after user posts in the URL, he should be redirected back to the BOT with the posted data. Can anyone guide me how to approach this. Below is the sample JSON we have created for redirecting user to URL.

{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.0",
  "body": [
    {
      "type": "TextBlock",
      "text": "This card's action will open a URL"
    }
  ],
  "actions": [
    {
      "type": "Action.OpenUrl",
      "title": "Action.OpenUrl",
      "url": "https://adaptivecards.io"
    }
  ]
}

Upvotes: 0

Views: 570

Answers (1)

Jos Verlinde
Jos Verlinde

Reputation: 1697

if you are asking about a Teams bot then you should follow the pattern for a Bot Task Module

  1. Bot message + Card
  2. Activate Task module (aka pop-up window)
    • task module can display another Adaptive Card
    • or a HTML page
  3. Task Module completes and sends back info to your bot using task/submit

Upvotes: 1

Related Questions