Getting started
Quick start
Sign up, create a widget key, add the chat widget to your site and answer your first message from the dashboard, then connect Slack to answer in Slack threads.
On this page
This takes about five minutes. You need a React or Next.js site (or any page where you can run React). Slack is optional for the first message: conversations show up in the dashboard and you can answer them there. Connect Slack when you are ready, which needs a workspace where you can install apps.
1. Create an account
Sign up at app.channlize.com/register. The dashboard home shows a Getting started checklist with these steps in the same order.
2. Create a widget key
Open API keys and create a widget key. It looks like wk_ followed by 32 hex characters. Note your project ID too; both are shown on the same page and in SDK & Integration.
The widget key is public: it is fine in client code and page source. Don't confuse it with a server API key (ch_live_…), which is secret. See API keys.
3. Add the widget to your site
Note
The widget and contact form work on any website until you verify a domain. The widget key (wk_…) is public by design, so these routes are rate limited per IP address. Once you verify a domain, the key only works on your verified domains and localhost.
Install the React SDK:
npm install @channlize/reactPut the keys in your environment. With Next.js, only NEXT_PUBLIC_ variables reach the browser:
# Both values are public (widget key, not the server key)
NEXT_PUBLIC_CHANNLIZE_WIDGET_KEY=wk_your_widget_key
NEXT_PUBLIC_CHANNLIZE_PROJECT_ID=your-project-idCreate a client component for the widget:
'use client';
import { ChannlizeChat } from '@channlize/react';
export function ChatWidget() {
return (
<ChannlizeChat
config={{
apiKey: process.env.NEXT_PUBLIC_CHANNLIZE_WIDGET_KEY!,
projectId: process.env.NEXT_PUBLIC_CHANNLIZE_PROJECT_ID!,
}}
primaryColor="#2563eb"
chatProps={{
title: 'Acme Support',
greeting: 'Hi there!',
welcomeMessage: 'Ask us anything.',
}}
/>
);
}Render it once in your root layout. The layout stays a server component; only ChatWidget runs on the client:
import type { ReactNode } from 'react';
import { ChatWidget } from './chat-widget';
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<body>
{children}
<ChatWidget />
</body>
</html>
);
}Not on Next.js? See React / Vite.
4. Send a test message
Open your site, click the chat launcher in the bottom-right corner and send a message. It shows up under Conversations in the dashboard right away.
Open the conversation and type a reply in the box at the bottom. The reply appears in the chat widget within a few seconds. That is the whole round trip, no Slack needed.
5. Connect Slack
To answer from Slack instead:
- Open Channels & Routing and click Connect Slack. Only organization admins can do this, and your Slack workspace must allow installing apps.
- Approve the Channlize app in Slack. You return to the dashboard with "Slack connected".
- Pick a default channel. New conversations are posted there unless a routing rule matches. Until one is set, conversations can't be posted to Slack.
Then, in Slack, open the channel you picked and run:
/invite @ChannlizeThe bot must be a member of every channel it posts to, and it only receives thread replies from channels it is in. The dashboard warns you when the bot isn't in a channel you chose.
6. Reply from Slack
Send another message from the widget. Within a few seconds a new thread appears in your default channel, with the message and the page it was sent from.
Reply in the thread in Slack. The reply appears in the chat widget in real time. Messages posted in the channel outside the thread are not sent to the visitor. Replies you send from the dashboard are posted to the thread too.
Nothing in Slack? See Troubleshooting.
7. Optional: add your domain
Under Domains add the domain your site runs on and verify it with a DNS TXT record. See Domains. Once a domain is verified, the widget only works on your verified domains and localhost, so verify every hostname your site uses.
Next steps
- Add a contact form that files conversations the same way.
- Send Events from your server: "New signup", "Invoice paid", "Deploy finished".
- Route conversations to different channels with routing rules.
- Handle conversations from Slack with commands and buttons.