JavaScript API
Open, close and listen to the widget from your own code.
Once the widget loads it exposes window.RiseChat:
RiseChat.open(); // open the chat window
RiseChat.close(); // close it
RiseChat.toggle();
RiseChat.hide(); // hide the bubble entirely
RiseChat.show();
RiseChat.on('ready', () => console.log('Risely Chat loaded'));
A common pattern is a "Chat with us" button:
<button onclick="RiseChat.open()">Chat with us</button>
Pass details about the visitor so agents see them in the inbox:
RiseChat.setAttributes({ plan: 'Gold', orders: 3 }); // shown under "Attributes"
RiseChat.setUser({ id: '42', email: 'emily@example.com', name: 'Emily Carter', hash: '…' });
RiseChat.logout(); // call when the user signs out
RiseChat.on('identified', (e) => console.log('verified?', e.verified));
setUser with a hash is identity verification, available on Pro and Business.
Didn't find what you need?
Email support