npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ringcentral-chatbot

v2.1.5

Published

## Philosophy

Downloads

122

Readme

RingCentral chatbot framework for JavaScript

Philosophy

  • Let developers focus on business logic instead of RingCentral/Glip Platform implementation details

Supported features

  • Bot token management
  • Bot WebHook management
  • Remove & re-add bot
  • Deploy to AWS Lambda
  • Update bot name and avatar
  • Bot join & leave group

Quick Start tutorials

We recommend you to finish reading/watching at least one of the tutorials above before reading on.

Create a RingCentral app

Click the link below to create a RingCentral app quickly:

Create Bot App

Do remember to change redirect uri from https://<chatbot-server>/bot/oauth to the real uri. If you don't have a public uri, leave that field blank.

Setup database

The first time you setup the bot, the database is empty, you need to create tables.

There is an easy way:

curl -X PUT -u admin:password https://<bot-server>/admin/setup-database

Migrate database

If you update the SDK from an early version, it might not work because the database schema has changed.

In such case, you can migrate the database:

curl -X PUT -u admin:password https://<bot-server>/admin/migrate-database

This command will smartly check your database and add new fields/tables if necessary.

Maintain

"Maintain" is useful in the following cases:

  • If for reason bot server changed, you need to re-setup WebHooks
  • You bot server was down for quite a while and your WebHooks have been blacklisted
  • There is orphan data in database

You can "maintain" to resolve the issues above:

curl -X PUT -u admin:password https://<bot-server>/admin/maintain

It is recommended that you create a cron job to run this command daily.

Diagnostic

Sometimes there are issues and you don't know what happened. This framework provides interfaces for diagnostic:

curl -X GET -u admin:password https://<bot-server>/admin/dump-database
curl -X GET -u admin:password https://<bot-server>/admin/list-subscriptions

To enable verbose logging, please define environment variable RC_VERBOSE_LOGGING with string value "true".

Update token

curl -X PUT -u admin:password https://<bot-server>/admin/update-token?id=<bot-extension-id>&token=access-token'

Hidden commands

The following commands are considered "hidden" or "easter eggs":

  • __rename__ <newName>: rename bot to newName
  • __updateToken__ <access_token>: update bot access token to access_token
  • A message with text __setAvatar__ and an attached image file: set bot avatar to the attached image

Advanced topics

About graduation

In order to graduate a RingCentral app, you need to invoke each API endpoint used in your app at least 5 times.

In order to to meet this requirement quickly, you can invoke API endpoints explicitly in code, for example:

await bot.rc.get('/restapi/v1.0/account/~/extension/~')

Advanced Demo bots

  • Glip Crontab Chatbot
    • Allow Glip users to create cron jobs to send notifications
    • Try it
    • By reading its source code, you will get how to handle messages from users and how to reply.
  • Glip RC Assistant Chatbot
    • Allow Glip users to query/edit their RingCentral data via Glip.
    • Try it
    • It is a demo for integrating Glip chatbot with RingCentral platform.
  • Glip Google Drive Chatbot
    • Allow Glip users to monitor their Google Drive events.
    • Try it
    • It is a demo for integrating Glip chatbot with a third party service (Google Drive)
    • It is also a demo for chatbot skills

Notes

  • AWS Lambda connects AWS RDS issue
    • If you create an RDS manually and let it create a new security group for you.
      • By default, the security group only allows inbound traffic from your current laptop's public IP address
      • AWS Lambda by default cannot access the newly created AWS RDS
      • We need to update security group to allow inbound traffic from 0.0.0.0/0
  • AWS Lambda and await issue
    • AWS Lambda is stateless and it won't keep a background runner
    • So if your code is async, DO remember to await. Otherwise that code will not be executed before Lambda invocation terminates
    • I forgot to await, a weird phenomenon was: whenever I issued a command, I always got reply of previous command
  • AWS Lambda global code dead-lock issue
    • Do NOT invoke lambda functions in global code outside of handlers
    • I tried once and it seemed to case dead-lock. Lots of requests which causes 429 error and database connection exhausted
      • In global code I did axio.put('https://<bot-server>/admin/maintain') and it caused dead-lock

Todo

  • send api to change presence, let bot user to be online