Hi Forum,
we have two ReactJS projects, one is a web portal and the other one is an phone app made with React Native.
We tried to integrate the JavaScript guest chat code available in the library:
https://developer.mypurecloud.com/api/rest/client-libraries/javascript-guest/index.html
but we got some issues in both projects.
INSTALLATION WITH NPM
Installing the library through the repository
yarn add purecloud-guest-chat-client
and importing it into the project
const platformClient = require('purecloud-guest-chat-client')
platformClient is an empty object, so not usable.
IMPORTING DIRECTLY THE JS FILE
We can import the library but we are forced to share the file globally in whole project and use it with
<
script type="text/javascript">
platformClient = require('platformClient');
<
/script>
const client = window.platformClient.ApiClient.instance
but is not a smooth solution and there are some security problems.
Is there a working version of the library that we can install using the repository?
If not, what other solutions we have for realize a stable and secure WebChat client (Standard JS SDK, REST API..) ?
Thank you in advance.