{"id":17054341,"url":"https://github.com/integerous/kakao-chatbot-java","last_synced_at":"2026-05-05T18:40:09.979Z","repository":{"id":107434971,"uuid":"142094089","full_name":"Integerous/Kakao-ChatBot-Java","owner":"Integerous","description":":honeybee: 카카오톡 플러스친구 챗봇","archived":false,"fork":false,"pushed_at":"2018-10-27T05:20:10.000Z","size":90,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-23T05:44:52.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pf.kakao.com/_xoEBQC","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Integerous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-24T02:32:19.000Z","updated_at":"2025-01-09T11:48:27.000Z","dependencies_parsed_at":"2023-05-17T11:30:31.308Z","dependency_job_id":null,"html_url":"https://github.com/Integerous/Kakao-ChatBot-Java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Integerous/Kakao-ChatBot-Java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integerous%2FKakao-ChatBot-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integerous%2FKakao-ChatBot-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integerous%2FKakao-ChatBot-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integerous%2FKakao-ChatBot-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Integerous","download_url":"https://codeload.github.com/Integerous/Kakao-ChatBot-Java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integerous%2FKakao-ChatBot-Java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002402,"owners_count":26083374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T10:14:35.231Z","updated_at":"2025-10-10T01:47:33.088Z","avatar_url":"https://github.com/Integerous.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 카카오톡 플러스친구 챗봇 개발\n\u003e결과물 : http://pf.kakao.com/_xoEBQC (챗봇 링크)  \n\u003e추후 회사 업무에 필요한 챗봇을 만들기 위해 테스트로 개발중인 카카오톡 플러스친구 챗봇 개발기 (작성중)\n\u003e\u003e[카카오톡 플러스친구 API v.2.0](https://github.com/plusfriend/auto_reply)의 Document를 보고 만들었다.  \n\n\n## 1. 개발 환경\n- AWS Ubuntu EC2\n- Spring boot 2.0.3.\n- Java 8\n\n## 2. 카카오톡 플러스친구 API v.2.0 간단 설명\n\n### 2.1. Objects\n\u003e카톡 플러스친구 챗봇 개발시 사용할 수 있는 객체는 [API Document](https://github.com/plusfriend/auto_reply#6-object)에 명시되어있다.\n- [Keyboard](https://github.com/plusfriend/auto_reply#61-keyboard)\n- [Message](https://github.com/plusfriend/auto_reply#62-message)\n- [MessageButton](https://github.com/plusfriend/auto_reply#621-messagebutton)\n- [Photo](https://github.com/plusfriend/auto_reply#63-photo)\n\n### 2.2. APIs\n- [Home Keyboard API](https://github.com/plusfriend/auto_reply#51-home-keyboard-api)\n- [메시지 수신 및 자동응답 API](https://github.com/plusfriend/auto_reply#52-%EB%A9%94%EC%8B%9C%EC%A7%80-%EC%88%98%EC%8B%A0-%EB%B0%8F-%EC%9E%90%EB%8F%99%EC%9D%91%EB%8B%B5-api)\n- [친구 추가/차단 알림 API](https://github.com/plusfriend/auto_reply#53-%EC%B9%9C%EA%B5%AC-%EC%B6%94%EA%B0%80%EC%B0%A8%EB%8B%A8-%EC%95%8C%EB%A6%BC-api)\n- [채팅방 나가기](https://github.com/plusfriend/auto_reply#54-%EC%B1%84%ED%8C%85%EB%B0%A9-%EB%82%98%EA%B0%80%EA%B8%B0)\n\n## 3. 구현\n### 3.1. API 명세서에 기재된 Objects를 VO 파일로 생성  \n\u003eGetter/Setter, ToString()을 생성하고, KeyboardVO의 경우에만 생성자로 버튼 배열 지정(버튼으로만 쓰이므로)\n  - KeyboardVO.java\n    ~~~java\n    String type;\n    String[] buttons;\n    ~~~\n  - MessageButtonVO.java\n    ~~~java\n    String label;\n    String url;\n    ~~~\n  - MessageVO.java\n    ~~~java\n    String text;\n    PhotoVO photo;\n    MessageButtonVO message_button;\n    ~~~\n  - PhotoVO.java\n    ~~~java\n    String url;\n    int width;\n    int height;\n    ~~~\n### 3.2. 메세지 수신 및 자동응답 API의 Objects를 VO 파일로 생성\n  - RequestMessageVO.java (메세지 수신)\n    ~~~java\n    String user_key;\n    String type;\n    String conent;\n    ~~~\n  - ResponseMessageVO.java (자동 응답)\n    ~~~java\n    MessageVO message;\n    KeyboardVO keyboard;\n    ~~~\n### 3.3. Controller 생성 \n~~~java\npackage com.example.demo.controller;\n\n~~~~~~ (import) 생략 ~~~~~~\n\n@RestController\npublic class BotController {\n\n\n    @RequestMapping(value = \"/keyboard\", method = RequestMethod.GET)\n    public KeyboardVO keyboard() {\n\n\tKeyboardVO keyboard = new KeyboardVO\n\t\t\t(new String[] {\"챗봇이랑 대화하기\", \"공지사항 보기\", \"FAQ 보기\", \"1:1 문의하기\"});\n\n\treturn keyboard;\t\t\n    }\n\t\n    @RequestMapping(value = \"/message\", method = RequestMethod.POST)\n    public ResponseMessageVO message(@RequestBody RequestMessageVO vo) {\n\t\t\n\tResponseMessageVO res_vo = new ResponseMessageVO();\n\tMessageVO mes_vo = new MessageVO();\n\tString command = vo.getContent();\n\n\n\tif(command.equals(\"메뉴\")) {\n\n\t\tmes_vo.setText(\"메뉴에서 명령을 선택해주세요~\");\n\t\tKeyboardVO keyboard = new KeyboardVO(new String[] \n\t\t\t\t{\"챗봇이랑 대화하기\", \"공지사항 보기\", \"FAQ 보기\", \"1:1 문의하기\"});\n\t\tres_vo.setKeyboard(keyboard);\n\t}\n\telse if(command.equals(\"1:1 문의하기\")) {\n\n\t\tMessageButtonVO messageButton = new MessageButtonVO();\n\t\tmessageButton.setLabel(\"1:1 문의하러 가기\");\n\t\tmessageButton.setUrl(\"https://www.funda.kr/v2/contact\");\n\t\tmes_vo.setMessage_button(messageButton);\n\t\tmes_vo.setText(\"안녕하세요 고객님, 아래의 URL을 클릭하여 1:1 문의사항을 작성해주세요. (메뉴 다시보기 = '메뉴' 입력!)\");\n\t}\n\n\t~~~~~~~~~~~~~~~~~~~~~~ 생략 ~~~~~~~~~~~~~~~~~~~~~\n\n\telse if(command.equals(\"챗봇이랑 대화하기\")){\n\n\t\tPhotoVO photo = new PhotoVO();\n\t\tphoto.setUrl(\"http://www.businesscomputingworld.co.uk/wp-content/uploads/2018/01/Chatbot.jpg\");\n\t\tphoto.setHeight(427);\n\t\tphoto.setWidth(540);\n\t\tmes_vo.setPhoto(photo);\n\t\tmes_vo.setText(\"(하트뿅) 저와 대화를 나눠볼까용? 아직은 매우 멍청하답니다ㅎㅎ (메뉴 다시보기 = '메뉴' 입력!)\");\n\t}\n\telse if(command.contains(\"안녕\")){\n\t\tmes_vo.setText(\"안녕하세요ㅎㅎ\");\n\t}\n\telse {\n\t\tmes_vo.setText(\"아직 구현하지 않은 명령어입니다. Ryan에게 문의하세요~\");\n\t}\n\n\tres_vo.setMessage(mes_vo);\n\treturn res_vo;\n    }\n}\n~~~\n## 4. AWS EC2 Linux 서버에 배포\n[AWS EC2 서버에 자바 소스코드 배포 및 재배포 (Deploying Java project on AWS EC2)](https://github.com/Integerous/TIL/blob/master/AWS/DeployOnAWSServer.md) 참고\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegerous%2Fkakao-chatbot-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintegerous%2Fkakao-chatbot-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegerous%2Fkakao-chatbot-java/lists"}