appinapp-sdk-js

yarn add appinapp-sdk-js

Usage no npm install needed!

<script type="module">
  import appinappSdkJs from 'https://cdn.skypack.dev/appinapp-sdk-js';
</script>

README

appinapp-sdk

Install

Plain Javascript (ES2015)

<script src="https://static.appinapp.co/dist/appinapp-sdk.js"></script>

Node Module (ES6)

yarn add appinapp-sdk-js

or

npm install appinapp-sdk-js

then in your app

import sdk from 'appinapp-sdk-js'

Use

Initialize

sdk.init(your_api_key);

Launch the UI

sdk.launchUI();

Launch the customer service chat directly

sdk.showChat();

Usage with React Native

import sdk from 'appinapp-sdk-js'

//......

AppRegistry.registerComponent(appName, () => withPhoto()(Root))

//......

sdk.init('api_key') // or init('api_key)
sdk.launch() // or launch()
sdk.stop() // or stop()