The channel Widget enables you to embed a fully functional channel from your Returning.AI community into external websites. It offers both public read-only displays and authenticated chatting capabilities.Installation#
1.
Enable widgets in your store settings on admin portalCommunity settings
→ Channels
2.
Configure whitelisted domains for securityNo domains added: The widget can be embedded and used on any domain.
Domains added: The widget can only be embedded and used on the listed domain(s).
4.
Configure widget's appearanceCustomise the theme of the widget to match your site.
5.
CTA Button (Only for public widgets)CTA button appears at the product cards.
Button content and URL can be customised.
6.
Choose a widget type and follow the instruction below for installation
Show the channel messages without authentication.Simple set up: Include the iframe code anywhere on your platform.
Display all messages in the channel.
Optional Call-to-Action (CTA) button on the bottom right.
Example Iframe code:
Full channel functionality with chatting capabilities.Requires development effort for user authentication.
Users will have be able to interact and send messages via the widget.
Step 1: Backend Authentication (Server-Side Only)#
Implement an endpoint on your server that authenticates the user and fetches the token from our service.API key is included in the bottom of the authenticated widget codes in admin panel.Store the API key in environment variables on your server (e.g., process.env.WIDGET_API_KEY in Node.js).
Never expose your API key in client-side code! The API key should only be used on your backend server.
Examples:
Node.js/Express exampleStep 2: Frontend Implementation (Client-Side)#
Add this JavaScript to your frontend to handle authentication and token passing to the widget iframe. It calls your backend endpoint and uses postMessage
for secure communication.Embed the iframe in your HTML where you want the widget to appear. Ensure the frontend script from Step 2 is loaded on the same page.Support#
For additional support, please contact our dedicated support team. We're here to help you maximize the potential of our APIs.This widget is provided by Returning.AI. Usage is subject to the Returning.AI Terms of Service and Widget License Agreement.