This repository contains a basic setup for a PureCloud Embeddable Framework example page that you can use to explore the PureCloud Embeddable Framework APIs in real-time.
- Clone the repository.
- Run
npm install
. - Edit the example.html and framework.js files.
- Run a local server.
- Open the example.html file in your browser.
You can now interact with the PureCloud Embeddable Framework APIs in real-time.
- Git installed on your computer.
- Node.js (with npm) installed on your computer.
- PureCloud credentials.
- A PureCloud OAuth client with the Token Implicit Grant (Browser) grant type selected.
For more information, see Create an OAuth client (Resource Center).
- Clone the repository.
- Run
npm install
in a command-line application.
- Edit the example.html file. This file is included in the cloned repository.
Note: If your PureCloud organization is located in North America (mypurecloud.com), you do not need to update the example.html file.
a. Open the file in a text editor.
b. Update the iframe URL to point to the correct region for your PureCloud organization.
For more information about the iframe URL, see iframe URLs (Developer Center). For a list of regions, see Change the region of your PureCloud organization (Resource Center).
c. Save your changes. - Edit the framework.js file. This file is included in the cloned repository.
a. Open the file in a text editor.
b. UnderclientIds
, add Client ID to the region where your PureCloud organization is located. Client ID is found in the OAuth client that you created in PureCloud.
For more information aboutclientIds
, see clientIds (Developer Center). For more information about the OAuth client, see Prerequisites.
c. Save your changes.
- Run a local server.
- Windows
a. Run Command Prompt as an administrator.
b. Typecd {name of your PureCloud Embeddable Framework project}
.
c. Typenode server.js
. - macOS
a. Open a Terminal window.
b. Typecd {name of your PureCloud Embeddable Framework project}
.
c. Typesudo node server.js
.
- Windows
- In your browser, go to https://localhost/example.html.
- Log in to the client.
You can now interact with the example page and explore the PureCloud Embeddable Framework APIs in real-time. For example, to see how click-to-dial works, click the click-to-dial link on the example page.
This content is licensed under the MIT license.
For more information about PureCloud Embeddable Framework, see PureCloud Embeddable Framework overview (Developer Center) and About PureCloud Embeddable Framework (Resource Center).