Getting Started with the IVS Chat Client Messaging JavaScript SDK
Before starting, you should be familiar with Getting Started with Amazon IVS Chat.
Add the Package
Use either:
$ npm install --save amazon-ivs-chat-messaging
or:
$ yarn add amazon-ivs-chat-messaging
React Native Support
The IVS Chat Client Messaging JavaScript SDK has a uuid
dependency which uses the crypto.getRandomValues
method. Since this
method is not supported in React Native, you need to install the additional polyfill
react-native-get-random-value
and import it at the top of the
index.js
file:
import 'react-native-get-random-values'; import {AppRegistry} from 'react-native'; import App from './src/App'; import {name as appName} from './app.json'; AppRegistry.registerComponent(appName, () => App);
Set Up Your Backend
This integration requires endpoints on your server that talk to the Amazon IVS Chat
API. Use the official AWS
libraries
Create a server endpoint that talks to the Amazon IVS Chat API CreateChatToken endpoint, to create a chat token for chat users.