Skip to content

ringcentral/engage-voice-embeddable

Repository files navigation

RingCX Embeddable (Beta)

Build Status

Introduction

This is an out-of-the-box embeddable web application that help developers to integrate RingCentral RingCX services to their web applications with few code.

Visit Online

Visit website in GitHub pages.

demo

Inject

<script>
  (function() {
    var rcs = document.createElement("script");
    rcs.src = "https://ringcentral.github.io/engage-voice-embeddable/adapter.js";
    var rcs0 = document.getElementsByTagName("script")[0];
    rcs0.parentNode.insertBefore(rcs, rcs0);
  })();
</script>

Documents

Awesome Embeddable projects

  • RingCentral RingCX Embeddable phone for Hubspot CRM - repo

Contribution and Development

Clone the code

$ git clone https://github.com/ringcentral/engage-voice-embeddable.git

Create a free RingCentral app

  1. Create a RingCentral developer free account
  2. Create a RingCentral app with platform type - "Browser Based"
  3. Add permissions Read Accounts to your app.
  4. Add redirect uri http://localhost:8080/redirect.html to your app settings.

Create environment variables file in project root path

Create .env file in project root path:

RINGCENTRAL_CLIENT_ID=your_ringcentral_app_client_id
RINGCENTRAL_SERVER=https://platform.ringcentral.com

ENGAGE_VOICE_AUTH_SERVER=https://engage.ringcentral.com

Notice: Now the RingCX service only is supported on production environment. Please make sure your key is graduated into RingCentral production environment.

Start development server

We assume you have pre-installed node.js >= 10 and yarn.

It is recommended to use yarn instead of npm. We have yarn.lock file in source code to lock dependence version. With yarn, we can install dependencies with correct version that work well with this project.

$ yarn       # use yarn to install dependencies
$ yarn start # start a webpack dev server

Open site: 'http://localhost:8080/' on browser

Deploy on production

If you create pull request to this repository and get merged, CI will deploy it to this repository's github page automatically. But for something that customized, you can deploy it to your own web space, such as your github page.

  1. Update .env file in production environment
  2. Run command to compile code and build release
$ yarn build --hosting-url your_host_url

Please replace your_host_uri with your own web host address, such as https://ringcentral.github.io/engage-voice-embeddable.

  1. Upload all files in build/rc folder to your web space. And visit it in browser.