Button Template

봇이 버튼 템플릿을 전송할 수 있다.

템플릿의 버튼을 이용하여 메시지에 postback 파라미터를 추가시켜 callback으로 서버에서 수신할 수 있다. 메시지 형식은 메시지(callback) 수신을 참고한다.

메시지는 다국어로 전송할 수 있다. 다국어 메시지는 클라이언트의 단말기 언어 설정에 맞게 표시된다.

버튼 템플릿의 구조는 다음과 같다.

structure_button

참고

  • 버튼 템플릿의 버튼은 최대 10개까지 등록할 수 있다.

Request Content {#button-request}

파라미터타입필수 여부설명
typestringY"button_template"으로 고정
contentTextstringY본문 내용
i18nContentTexts[]arrayN다국어 본문 내용 목록
i18nContentTexts[].languagestringY다국어 언어 코드
• ko_KR • ja_JP • zh_CN • zh_TW • en_US
i18nContentTexts[].contentTextstringY다국어 본문 내용
최대 글자수: 1000자
actionsarray<Action Object>Y버튼 템플릿에 사용할 버튼

Request Example {#button-request-example}

example_button

{  "content": {    "type": "button_template",    "contentText": "What do you want?",    "actions": [{      "type": "uri",      "label": "WorksMobile Homepage",      "uri": "https://line.worksmobile.com"    }, {      "type": "message",      "label": "FAQ",      "postback": "ButtonTemplate_FAQ"    }]  }}