PATCH/bots/{botId}
등록한 봇 정보를 부분적으로 수정한다. 입력하지 않은 파라미터들은 기존 설정값을 유지한다.
allowDomains 파라미터를 이용하여 봇을 사용할 수 있는 도메인 범위를 지정할 수 있다. 봇이 등록된 도메인 중 변경되는 allowDomains 목록에 없는 도메인은 자동으로 삭제된다.
봇의 정보 중 이름, 사진, 설명 부분을 다국어로 등록할 수 있으며 다국어로 등록된 내용은 클라이언트 언어 설정에 맞게 표시된다.
메시지방 참여 형태를 지정할 수 있다. 기본값은 1:1 메시지이며, enableGroupJoin 파라미터를 이용해 '조직/그룹, 1:N 메시지방 초대 가능' 옵션을 사용할 수 있다. enableGroupJoin 파라미터를 이용해 기존에 설정되었던 '조직/그룹, 1:N 메시지방 초대 가능' 옵션을 해제하면 조직/그룹, 1:N 메시지방에 초대되었던 봇이 퇴장한다.
고객사의 메시지 callback 수신 서버를 지정할 수 있다. 메시지 수신 서버는 HTTPS만 허용하며, 빈 문자열로 설정하면 callback을 보내지 않는다. 또한, 수신할 메시지방 이벤트는 channelEvents에, 사용자 이벤트는 callbackEvents에 지정하여 선택적으로 수신할 수 있다. 해당 봇과의 1:1 메시지방 하단 메뉴 중 callbackEvents에 지정된 이벤트는 활성화된다.
참고
- 이름 항목에 개행 문자를 입력하면 공백으로 치환된다.
- callbackUrl에 자체 서명된 인증서는 허용되지 않는다.
- 허용된 인증 기관 목록을 보려면 CA 목록을 참고한다.
주의
OAuth 2.0 인증.
자세한 인증 방식은 인가·인증을 참고한다.
bot
| Parameter | Type | Description |
|---|---|---|
| botId | integer | 봇 ID required example : 2000001 format : int64 |
| Header | type | Description |
|---|---|---|
| Authorization | string | Bearer {token} required |
| Content-Type | string | application/json required example : application/json |
| Property | Type | Description |
|---|---|---|
| botName | string | 봇 이름 required maxLength : 100 |
| photoUrl | string | 봇 프로필 이미지가 저장된 URL(PNG 형식, 640x640 크기 권장, HTTPS만 허용) required maxLength : 1000 |
| description | string | 봇 설명 required maxLength : 100 |
| administrators | array (string) | 봇 담당자 계정 required minItems : 1 maxItems : 3 uniqueItems : true |
| subadministrators | array (string) | 봇 부담당자 계정 minItems : 0 maxItems : 3 uniqueItems : true |
| allowDomains | array (integer) | 봇을 사용 가능한 도메인 목록 minItems : 0 uniqueItems : true |
| enableCallback | boolean | 봇 이벤트 수신 여부 default : false |
| channelEvents | array (string) | 수신할 봇 메시지방 이벤트 종류
default : message,join,leave,joined,left,postback minItems : 0 uniqueItems : true |
| callbackEvents | array (string) | 수신할 봇 메시지 이벤트 종류
minItems : 0 uniqueItems : true |
| callbackUrl | string | 고객사의 봇 이벤트 수신 서버. HTTPS만 허용된다. maxLength : 1000 |
| enableGroupJoin | boolean | 1:N 메시지방 참여 가능 여부 default : false |
| defaultRichmenuId | string | 모든 사용자에게 적용되는 기본 리치 메뉴 ID |
| i18nBotNames | array (i18nBotNames) | 봇의 다국어 이름 minItems : 0 |
| i18nDescriptions | array (i18nDescriptions) | 봇의 다국어 설명 minItems : 0 |
| i18nPhotoUrls | array (i18nPhotoUrls) | 봇의 다국어 이미지 minItems : 0 |
| Property | Type | Description |
|---|---|---|
| language | string | 다국어 언어 코드 required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| botName | string | 봇 이름 required maxLength : 100 |
| Property | Type | Description |
|---|---|---|
| language | string | 다국어 언어 코드 required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| description | string | 봇의 설명 required maxLength : 100 |
| Property | Type | Description |
|---|---|---|
| language | string | 다국어 언어 코드 required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| photoUrl | string | 봇 프로필 이미지가 저장된 URL required maxLength : 1000 |
example
1{2 "botName": "Example bot",3 "photoUrl": "https://example.com/favicon.png",4 "description": "WorksMobile's A.I. conversation enabled bot",5 "administrators": [6 "d191e339-3299-44e6-7a44-04d9cb01a5e0"7 ],8 "subadministrators": [9 "e417a131-a56d-44a4-5304-033e16fca8d1"10 ],11 "allowDomains": [12 1000000113 ],14 "enableCallback": true,15 "callbackEvents": [16 "text",17 "location",18 "sticker",19 "image",20 "file",21 "audio",22 "video"23 ],24 "channelEvents": [25 "message",26 "join",27 "leave",28 "joined",29 "left",30 "postback",31 "begin",32 "end"33 ],34 "callbackUrl": "https://example.com/callback",35 "enableGroupJoin": true,36 "defaultRichmenuId": "40001",37 "i18nBotNames": [38 {39 "language": "en_US",40 "botName": "Example bot"41 }42 ],43 "i18nDescriptions": [44 {45 "language": "en_US",46 "description": "Example description"47 }48 ],49 "i18nPhotoUrls": [50 {51 "language": "en_US",52 "photoUrl": "https://example.com/favicon.png"53 }54 ]55}OK
| Property | Type | Description |
|---|---|---|
| botId | integer | 봇 ID format : int64 readOnly : true |
| botName | string | 봇 이름 required maxLength : 100 |
| photoUrl | string | 봇 프로필 이미지가 저장된 URL(PNG 형식, 640x640 크기 권장, HTTPS만 허용) required maxLength : 1000 |
| description | string | 봇 설명 required maxLength : 100 |
| administrators | array (string) | 봇 담당자 계정 required minItems : 1 maxItems : 3 uniqueItems : true |
| subadministrators | array (string) | 봇 부담당자 계정 minItems : 0 maxItems : 3 uniqueItems : true |
| allowDomains | array (integer) | 봇을 사용 가능한 도메인 목록 minItems : 0 uniqueItems : true |
| enableCallback | boolean | 봇 이벤트 수신 여부 default : false |
| channelEvents | array (string) | 수신할 봇 메시지방 이벤트 종류
default : message,join,leave,joined,left,postback minItems : 0 uniqueItems : true |
| callbackEvents | array (string) | 수신할 봇 메시지 이벤트 종류
minItems : 0 uniqueItems : true |
| callbackUrl | string | 고객사의 봇 이벤트 수신 서버. HTTPS만 허용된다. maxLength : 1000 |
| enableGroupJoin | boolean | 1:N 메시지방 참여 가능 여부 default : false |
| defaultRichmenuId | string | 모든 사용자에게 적용되는 기본 리치 메뉴 ID |
| i18nBotNames | array (i18nBotNames) | 봇의 다국어 이름 minItems : 0 |
| i18nDescriptions | array (i18nDescriptions) | 봇의 다국어 설명 minItems : 0 |
| i18nPhotoUrls | array (i18nPhotoUrls) | 봇의 다국어 이미지 minItems : 0 |
| createdTime | string | 봇 생성 시간 (YYYY-MM-DDThh:mm:ssTZD) format : date-time readOnly : true |
| modifiedTime | string | 봇 수정 시간 (YYYY-MM-DDThh:mm:ssTZD) format : date-time readOnly : true |
| Property | Type | Description |
|---|---|---|
| language | string | 다국어 언어 코드 required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| botName | string | 봇 이름 required maxLength : 100 |
| Property | Type | Description |
|---|---|---|
| language | string | 다국어 언어 코드 required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| description | string | 봇의 설명 required maxLength : 100 |
| Property | Type | Description |
|---|---|---|
| language | string | 다국어 언어 코드 required Allowed values : ko_KR, ja_JP, en_US, zh_CN, zh_TW |
| photoUrl | string | 봇 프로필 이미지가 저장된 URL required maxLength : 1000 |
example
1{2 "botId": 2000001,3 "botName": "Example bot",4 "photoUrl": "https://example.com/favicon.png",5 "description": "WorksMobile's A.I. conversation enabled bot",6 "administrators": [7 "d191e339-3299-44e6-7a44-04d9cb01a5e0"8 ],9 "subadministrators": [10 "e417a131-a56d-44a4-5304-033e16fca8d1"11 ],12 "allowDomains": [13 1000000114 ],15 "enableCallback": true,16 "channelEvents": [17 "message",18 "join",19 "leave",20 "joined",21 "left",22 "postback",23 "begin",24 "end"25 ],26 "callbackEvents": [27 "text",28 "location",29 "sticker",30 "image",31 "file",32 "audio",33 "video"34 ],35 "callbackUrl": "https://example.com/callback",36 "createdTime": "2022-08-08T01:12:05+09:00",37 "modifiedTime": "2022-08-09T01:12:05+09:00",38 "enableGroupJoin": true,39 "defaultRichmenuId": "40001",40 "i18nBotNames": [41 {42 "language": "en_US",43 "botName": "Example bot"44 }45 ],46 "i18nDescriptions": [47 {48 "language": "en_US",49 "description": "Example description"50 }51 ],52 "i18nPhotoUrls": [53 {54 "language": "en_US",55 "photoUrl": "https://example.com/favicon.png"56 }57 ]58}