Share via


CardAction Class

A clickable action.

Constructor

pydantic model CardAction

Parameters

Name Description
type
Required

The type of action implemented by this button. Possible values include: 'openUrl', 'imBack', 'postBack', 'playAudio', 'playVideo', 'showImage', 'downloadFile', 'signin', 'call', 'messageBack'

title
Required
str

Text description which appears on the button

image
Required
str

Image URL which will appear on the button, next to text label

text
Required
str

Text for this action

display_text
Required
str

(Optional) text to display in the chat feed if the button is clicked

value
Required

Supplementary parameter for action. Content of this property depends on the ActionType

channel_data
Required

Channel-specific data associated with this action

image_alt_text
Required
str

Alternate image text to be used in place of the image field

Keyword-Only Parameters

Name Description
type
Required
title
Required
image
Default value: None
text
Default value: None
displayText
Default value: None
value
Default value: None
channelData
Default value: None
imageAltText
Default value: None

Attributes

channel_data

field channel_data: object | None = None (alias 'channelData')

display_text

field display_text: str = None (alias 'displayText')

image

field image: str = None

image_alt_text

field image_alt_text: str = None (alias 'imageAltText')

text

field text: str = None

title

field title: str [Required]

type

field type: str [Required]

value

field value: object = None