사용자 멘션

봇이 메시지방 내 특정 사용자나 모든 사용자를 멘션하여 메시지를 보낼 수 있다.

참고

  • 멘션 기능에 대한 상세 내용은 가이드 페이지의 멘션을 참조한다.
  • 동일한 사용자를 포함하여 최대 50명까지 멘션할 수 있다.

사용자 멘션을 지원하는 메시지 타입과 적용되는 파라미터는 다음과 같다.

  • Text : text 파라미터
  • Link : contentText 파라미터
  • Button template : contentText 파라미터
  • Flexible template
    • Text: text 파라미터
    • Span: text 파라미터

특정 사용자 멘션 {#mention-member}

메시지방 내 특정 사용자를 멘션할 경우 다음과 같은 포맷으로 메시지를 작성한다.
멘션된 사용자의 userId는 사용자의 이름으로 변경되어 전달된다.
Hello, <m userId="{userId}"> => Hello, @{userName}

참고

  • 메시지 전송 - 채널 대상 와 메시지 전송 - 사용자 대상 서 이용할 수 있습니다.
  • 다국어 멘션 메시지를 전송할 때는 모든 다국어 메시지에 동일한 사용자가 멘션되어야 한다.

모든 사용자 멘션 {#mention-all}

메시지방 내 모든 사용자를 멘션할 경우 다음과 같은 포맷으로 메시지를 작성한다.
Hi, <m userId="all"> => Hi, @All

참고

  • 메시지 전송 - 채널 대상 서 이용할 수 있습니다.
  • 다국어 멘션 메시지를 전송할 때는 모든 다국어 메시지에 동일하게 모든 사용자가 멘션되어야 한다.

Request Example {#mention-example}

Text 타입 {#mention-example-text}

{  "content": {    "type": "text",    "text": "Hello, &lt;m userId=\"admin@example.com\">"  }}

Link 타입 {#mention-example-link}

{  "content": {    "type": "link",    "contentText": "&lt;m userId=\"admin@example.com\">, please refer to the link.",    "linkText": "link text",    "link": "http://www.worksmobile.com"  }}

Button template 타입 {#mention-example-button-template}

{  "content": {    "type": "button_template",    "contentText": "&lt;m userId=\"admin@example.com\">, please refer to the link.",    "actions": [{      "type": "uri",      "label": "Homepage",      "uri": "https://example.com"    }, {      "type": "message",      "label": "FAQ",      "postback": "ButtonTemplate_FAQ"    }]  }}