GET/bots/{botId}/richmenus/users/{userId}

Gets rich menus set for the user.

Note

  • This API operation does not get default rich menus.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

bot.message
bot
bot.read

HTTP Request

GEThttps://www.worksapis.com/v1.0/bots/{botId}/richmenus/users/{userId}

Path Parameters

ParameterTypeDescription
botId integer 

Bot ID


required
example : 2000001
format : int64 
userId string 

User ID


required
example : userf7da-f82c-4284-13e7-030f3b4c756x 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
richmenuId string 

Rich menu ID


readOnly : true 
richmenuName string 

Rich menu name. It is used to manage rich menus and is not shown to users.


required
maxLength : 300 
areas array (RichmenuArea) 

List of areas to set rich menu actions


required
minItems : 1
maxItems : 20 
size object (size) 

Size object of the rich menu


required 

RichmenuArea

PropertyTypeDescription
action object (action) 

Action that occurs when the area is pressed


required 
bounds object (bounds) 

Bound object of the rich menu button


required 

action

PropertyTypeDescription
type string 

Action type


required
Allowed values : postback, message, uri, copy 
label string 

Label displayed on an element.
It is required, except for "defaultAction" of a rich menu and carousel.
If it is not specified for a rich menu, the default message is displayed in the desktop environment.

  • Maximum length for an image carousel: 12 characters
  • Maximum length for a persistent menu: 1,000 characters
  • Maximum length for other types: 20 characters
 
data string 

Text string returned through the callback of the postback.data property.


maxLength : 300 
displayText string 

Chat message sent by a user. If it is not specified, no text is displayed.
Note that it is required for a quick reply.


maxLength : 300 
postback string 

Text string returned through the message.postback property


maxLength : 1000 
text string 

Text message sent when an element is pressed. It is required for a carousel, image carousel, rich menu and quick reply, and is replaced with the label value for a button template, list template, and persistent menu.


maxLength : 300 
uri string 

URI that opens when an element is pressed. The "http" and "https" schemas are supported.


maxLength : 1000 
copyText string 

Text string copied to the clipboard when an element is pressed.


maxLength : 1000 
i18nDisplayTexts array (i18nDisplayTexts) 

List of multilingual display texts


minItems : 0 
i18nLabels array (i18nLabels) 

List of multilingual labels


minItems : 0 
i18nTexts array (i18nTexts) 

List of text messages sent when an element is pressed.


minItems : 0 

i18nDisplayTexts

PropertyTypeDescription
language string 

Language code


required
Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW 
displayText string 

Chat message sent by a user.


required
maxLength : 300 

i18nLabels

PropertyTypeDescription
language string 

Language code


required
Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW 
label string 

Label displayed on an element

  • Maximum length for an image carousel: 12 characters
  • Maximum length for a persistent menu: 1,000 characters
  • Maximum length for other types: 20 characters

required 

i18nTexts

PropertyTypeDescription
language string 

Language code


required
Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW 
text string 

Text message sent when an element is pressed. It is required for a carousel, image carousel, rich menu and quick reply, and is replaced with the label value for a button template, list template, and persistent menu.


required
maxLength : 300 

bounds

PropertyTypeDescription
x integer 

Horizontal offset from the left of the area


required
minimum : 0
maximum : 2500
format : int64 
y integer 

Vertical offset from the top of the area


required
minimum : 0
maximum : 1686
format : int64 
width integer 

Width of the area


required
minimum : 0
maximum : 2500
format : int64 
height integer 

Height of the area


required
minimum : 0
maximum : 1686
format : int64 

size

PropertyTypeDescription
width integer 

Width of the rich menu


required
Allowed values : 2500
format : int64 
height integer 

Height of the rich menu


required
Allowed values : 843, 1686
format : int64 

Response Example

example

1{2  "richmenuId": "40001",3  "richmenuName": "Example Richmenu",4  "areas": [5    {6      "action": {7        "type": "postback",8        "label": "Example label",9        "data": "Example data",10        "displayText": "Example displayText",11        "i18nDisplayTexts": [12          {13            "language": "en_US",14            "displayText": "Example display text"15          }16        ],17        "i18nLabels": [18          {19            "language": "en_US",20            "label": "Example label"21          }22        ]23      },24      "bounds": {25        "x": 0,26        "y": 0,27        "width": 2500,28        "height": 84329      }30    }31  ],32  "size": {33    "width": 2500,34    "height": 84335  }36}