Build a KakaoTalk Chatbot in Python
The Kakao Plus Friend service will be shutdown by Kakao service policy.
Setup Hosting for Bot
First, create an account on BotHub.Studio, a chatbot hosting service for developers, and install CLI tool using the command below:
$ pip install bothub-cli
Run configure
next:
$ bothub configure
Create a project directory:
A template code will be generated after init
finished.
$ mkdir MyBot
$ cd MyBot
$ bothub init
Now we connect with ‘KakaoTalk’ channel:
$ bothub channel add kakao
The ‘URL’ that is result of command will be used ‘KakaoTalk’ setting page:
And deploy the project to server:
$ bothub deploy
Creating a KakaoTalk Plus Friend Bot
1. Connect to ‘KakaoTalk Plus Friend’ webpage:
2. Log-in with Kakao ID/Password:
3. Create ‘Plus Friend’:
4. Change ‘KakaoTalk Plus Friend’ to public:
5. Create ‘KakaoTalk SmartChatting’ App:
1) Select the ‘SmartChatting’ tab.
2) Click ‘API 형’ menu
(If you make a new one, you can not find ‘API 형' button because Kakao ready to shutdown old chatbot.)
3) Input App Name and App Description as you want
4) Paste URL from ‘BotHub.Studio’ channel connection result to App URL
5) Enter the information of chatbot at ‘앱 설명'
6) Test a webhook working to push ‘API테스트' button.
7) 8) 9) Check the personal information agreement and register phone number
10) Enable ‘API형 사용'
11) Click the save button ‘API형 저장하기'
6. ‘KakaoTalk SmartChatting’ App Test
Let’s try to test with ‘KakaoTalk SmartChatting’.
You can find a app by searching registered ‘App Name’ at the ‘Chatting’ tab and communicate with Bot.
Should you have any questions, please feel free to contact bothub@bothub.studio anytime.