Appearance
@line/bot-sdk / PostbackAction
Type Alias: PostbackAction
PostbackAction =
object
Defined in: lib/types.ts:2066
When a control associated with this action is tapped, a postback event is returned via webhook with the specified string in the data property.
Properties
data
data:
string
Defined in: lib/types.ts:2072
String returned via webhook in the postback.data property of the postback event (Max: 300 characters)
displayText?
optionaldisplayText:string
Defined in: lib/types.ts:2092
Text displayed in the chat as a message sent by the user when the action is performed.
- Required for quick reply buttons.
- Optional for the other message types.
Max: 300 characters
The displayText and text properties cannot both be used at the same time.
fillInText?
optionalfillInText:string
Defined in: lib/types.ts:2111
String to be pre-filled in the input field when the keyboard is opened. Valid only when the inputOption property is set to openKeyboard. The string can be broken by a newline character (\n).
Max: 300 characters
inputOption?
optionalinputOption:"closeRichMenu"|"openRichMenu"|"openKeyboard"|"openVoice"
Defined in: lib/types.ts:2103
The display method of such as rich menu based on user action. Specify one of the following values:
closeRichMenu: Close rich menuopenRichMenu: Open rich menuopenKeyboard: Open keyboardopenVoice: Open voice message input mode
This property is available on LINE version 12.6.0 or later for iOS or Android.
text?
optionaltext:string
Defined in: lib/types.ts:2081
Text displayed in the chat as a message sent by the user when the action is performed. Returned from the server through a webhook.
- This property cannot be used with quick reply buttons. (Max: 300 characters)
- The
displayTextandtextproperties cannot both be used at the same time.
Deprecated
type
type:
"postback"
Defined in: lib/types.ts:2067