简单的ringcentral chatbot框架python扩展,添加了“world time”命令支持。
ringcentral-bot-framework-extension-world-time的Python项目详细描述
ringcentral-chatbot-python-ext-world-time
简单的ringcentral chatbot python扩展,添加了world time
命令支持。
目录
使用
先决条件
- python3.6+和pip3
- 创建bot应用程序:登录到developer.ringcentral.com,并创建具有以下权限的
public
Server/Bot
应用程序:ReadContacts, ReadMessages, ReadPresence, Contacts, ReadAccounts, SMS, InternalMessages, ReadCallLog, ReadCallRecording, WebhookSubscriptions, Glip
快速启动
# use virtualenv pip3 install virtualenv # might need sudo# init virtual env virtualenv venv --python=python3 # use envsource ./venv/bin/activate # install deps pip install -r requirements.txt # run ngrok proxy# since bot need https server,# so we need a https proxy for ringcentral to visit our local server ./bin/proxy # will show:# Forwarding https://xxxxx.ngrok.io -> localhost:8989# create env file cp .sample.env .env # then edit .env, set proper setting,# and goto your ringcentral app setting page, set OAuth Redirect URI to https://https://xxxxx.ngrok.io/bot-oauthRINGCENTRAL_BOT_SERVER=https://xxxxx.ngrok.io ## for bots auth required, get them from your ringcentral app pageRINGCENTRAL_BOT_CLIENT_ID=RINGCENTRAL_BOT_CLIENT_SECRET=# create bot config cp config.sample.py config.py # run local dev server ./bin/start
测试机器人
- 转到ringcentral应用程序的bot部分,单击“添加到glip”
- 登录到https://glip-app.devtest.ringcentral.com,通过搜索bot的名称找到它。跟机器人谈谈
- 编辑config.py以更改bot bahavior并在https://glip-app.devtest.ringcentral.com中测试
许可证
麻省理工学院