Overview
Your Mawgood as a chat bubble on your own website and apps, set up with two values.
Beta
The chat bubble SDKs are at version 0.1.0. Within v1 the chat API only grows: new fields and message types are added, nothing documented here is removed or renamed.
The chat bubble (Website & app chat, «شات الموقع والتطبيق» in Arabic) puts your Mawgood on your own website, Flutter app or React Native app. Customers chat there like on WhatsApp, and the same Mawgood answers with the same knowledge, actions, orders, bookings and payment links. Your team takes over from the same inbox, where these conversations carry the «شات» mark.
You paste two values from the dashboard: the site key (mwg_pk_live_…) and the Mawgood ID
(mw_ag_…). Neither is a secret.
What you get
Website
One script tag, or npm with React, Next.js and Vue.
React Native
Expo (managed or bare) and bare React Native, on iOS and Android.
Flutter
Native Flutter widgets on iOS and Android.
Identifying customers
Sign who the customer is on your server, to join their WhatsApp chats.
Every SDK draws its own native UI (no iframe, no WebView), gets replies in real time (Socket.IO, with a Server-Sent Events fallback, never polling), keeps unsent messages through a lost connection, and wears the look you set in the dashboard, restyled live when you save it. Arabic (right-to-left) and English are built in.
Before you install
In the dashboard, open your Mawgood › Overview and channels › Website & app chat (Owners, Admins and Developers):
- Turn on the chat.
- Under Site keys, create a key: a Live key for your real site or app, a Test key for
trying it out (a test key
also works on
localhostand127.0.0.1). - Under Allowed sites and apps, add where the key may be used: your site's origin
(
https://shop.example.com, orhttps://*.example.comfor every subdomain), your iOS bundle ID and your Android package name. Up to 20 in all per key. A call from anywhere else is refused. - Open Install code (the Install the chat dialog): the snippet for each platform (Website, React Native, Flutter, Identity signing) already has your site key and Mawgood ID filled in.
The card also holds the Mawgood ID, the Identity secret, the privacy page, the Usage limits and Customize the look. Site keys are also listed under Settings › Developers.
How it differs from the public API
The chat bubble and the public API are separate products with separate keys.
| Public API | Chat bubble | |
|---|---|---|
| Who calls it | Your server | Your customers' browsers and apps, through the SDKs |
| Key | Secret mwg_sk_…, kept on your server | Publishable mwg_pk_…, safe in a page or an app |
| Locked by | The key being secret | The sites and apps you list for the key |
| What it does | Sends approved WhatsApp templates | A live chat with your Mawgood and your team |
| Base URL | https://api.mawgood.ai/v1 | https://mawgood.ai/api/chat/v1 (used by the SDKs; you don't call it) |
| Plan | A paid plan (402 plan_required before that) | Any plan, trials included |
Never put a secret key (mwg_sk_…) or your identity secret (mw_sk_…) in a website or an app.
What it costs
Each AI reply is 1 credit, like every channel. Your team's replies, customers' messages and opening the bubble are free. At zero credits the Mawgood stops replying and new messages go to your team, as on every channel.
Next
- Install on your website, React Native or Flutter.
- Customize the look.
- Security and limits before you go live.