Forum Discussion
Team Channel: Card with button. Specific URL for each user?
diegoSpace It is not possible to specify different URL's for different users on click of a button. One way you could do this is open a taskmodule and check the user details there and open a url inside task module but that is not a reliable way and is something we do not recommend.
Gousia_Begum I will try it, just to see if works for me. Why do you don'r recommend it?
As far as I understand in the docu, I must add an 'Action.Submit' in my card, correct? I have that in the card.json sent to the team channel:
"actions": [
{
"type": "Action.Submit",
"title": "Test1",
"data": {
"msteams": {
"type": "invoke",
"value": "{\"key1\": \"value1\", \"key2\": \"value2\"}"
}
}
}
]
I receive a post in my bot ("type='invoke'), but is there any method in the API to handle it? Or must I check the 'type' and process then? Now I have that code, and I return a task to open a browser in Teams channel, but no browser is open (I get no error):
onPostReceived(req, res) {
if (req.body == "invoke") {
var task = {
"task": {
type: 'continue',
value: {
width: 500,
height: 200,
title: "site title",
url: myUrl,
fallbackUrl: myUrl
}
}
}
res.writeHeader(200, { "Content-Type": "application/json" });
res.write(JSON.stringify(task));
res.end();
}
}
What am I doing wrong?
Thanks,
Diego