Skip to main content

RingCentral engage digital channel SDK Framework for Python

Project description

RingCentral Engage digital source SDK python

Framework(python) to create Engage Digital channel SDK channel for RingCentral Engage Digital. Wiki about RingCentral Engage Digital channel SDK channel, which is a customized channel that support any source user want to use.

Install Prerequisites

  • Python3.6+ and Pip3.
  • First we install virtualenv which will create an isolated environment in which to install and run all the python libraries needed by this framework. Using virtualenv will ensure that the libraries installed for this project do not conflict or disrupt the other python projects you are working on.
  • RingCentral Engage(Dimelo) account, request a demo.

Quick start

Let's start a simple RingCentral Engage source server.

# init project
bin/init
source venv/bin/activate

Next, we need to run ngrok, a tool for routing web requests to a localhost. This is what will allow your local bot in development to receive webhooks from RingCentral. ngrok is a node app and is installed and start as follows:

./bin/proxy

# will show
Forwarding                    https://xxxx.ap.ngrok.io -> localhost:9898
# Remember the https://xxxx.ap.ngrok.io, we will use it later

Follow Step by step guide to create Dimelo SDK source in Admin console to prepare the source.

# create env file
cp .env.sample .env
# then edit .env, set proper setting according to the tip in .env

# run local dev server
./bin/start

Test source server

Save your source, your server will get request, you check the request log from console.

Use it as CLI tool

pip3 install ringcentral_engage_digital_source_sdk
rces path/to/config_file.py

Use is as a module

docs/direct-use.md

Post message to channel

You can get channel realtime url and api token from channel setting page, post new message to the channel.

Check post_message_demo/post_message_demo.py as an example.

from ringcentral_engage_digital_source_sdk import postMessageToEngage

def main ():
  url = 'RINGCENTRAL_ENGAGE_DIGITAL_ENDPOINT'
  token = 'RINGCENTRAL_ENGAGE_DIGITAL_API_TOKEN'
  body = {
    'action': 'messages.create',
    'params': {
      'actions': ['show', 'reply'],
      'id': 'xxxxx',
      'body': 'hi there~',
      'thread_id': 'yyyyy',
      'author': {
        'id': 'zzzzz',
        'firstname': 'John',
        'lastname': 'Doe',
        'screenname': 'John Doe',
        'created_at': 1622426621537
      }
    }
  }
  r = postMessageToEngage(body, url, token)
  print('result', r)

Write a config

docs/write-a-config.md

Build and Deploy to AWS Lambda

todo

Init a source server project with factory CLI tool

todo

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file ringcentral_engage_digital_source_sdk-0.0.1.tar.gz.

File metadata

  • Download URL: ringcentral_engage_digital_source_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for ringcentral_engage_digital_source_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 19f16d8fd05ad4035678b75cfa01ecdab9c54fe254008df30161a412aa380d80
MD5 1ffa8a824fd3033a24739bddb7159afe
BLAKE2b-256 6d2c1b1ebdf63239e62c6f1fc8e2573066dc4273af9501cf35ddf7a6286e9499

See more details on using hashes here.

File details

Details for the file ringcentral_engage_digital_source_sdk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ringcentral_engage_digital_source_sdk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for ringcentral_engage_digital_source_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e779310cca6f698b76358ed91112e45e84396f36e111b4ac5eab87b0c40f681
MD5 52bec24fc9c592bb9cfae3c8d1ed56c1
BLAKE2b-256 65a10d6ab16c51518fc93a19a3480d9f279c8b2173b0204beb175f6b59c7c05a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page