Quickstart
Create an app
Before you begin, create an app at platform.plucky.ai or your given instance.
Install the chat widget
- Javascript
- NPM
<script>
const APP_ID = "Your app id"
const BASE_URL = "https://widget.plucky.ai"
window.pluckySettings = {
baseUrl: BASE_URL,
appId: APP_ID,
user: {
id: 'user-123',
name: 'John Doe',
email: '[email protected]',
createdAt: '2024-01-15T00:00:00.000Z',
},
};
</script>
<script>
(function(){var w=window;var ic=w.Plucky;if(typeof ic==="function"){ic('update',w.pluckySettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Plucky=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src=(window.pluckySettings.baseUrl||'https://widget.plucky.ai')+'/loader/'+window.pluckySettings.appId;var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);};if(document.readyState==='complete'){l();}else if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();
</script>
import { Plucky } from '@plucky-ai/chat-sdk'
const APP_ID = "Your app id"
const BASE_URL = "https://widget.plucky.ai"
Plucky({
appId: APP_ID,
baseUrl: BASE_URL,
user: {
id: 'user-123',
name: 'John Doe',
email: '[email protected]',
createdAt: '2024-01-15T00:00:00.000Z',
},
})