Skip to Content
Developer docsBeta
Website & app chat

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

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):

  1. Turn on the chat.
  2. 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 localhost and 127.0.0.1).
  3. Under Allowed sites and apps, add where the key may be used: your site's origin (https://shop.example.com, or https://*.example.com for 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.
  4. 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 APIChat bubble
Who calls itYour serverYour customers' browsers and apps, through the SDKs
KeySecret mwg_sk_…, kept on your serverPublishable mwg_pk_…, safe in a page or an app
Locked byThe key being secretThe sites and apps you list for the key
What it doesSends approved WhatsApp templatesA live chat with your Mawgood and your team
Base URLhttps://api.mawgood.ai/v1https://mawgood.ai/api/chat/v1 (used by the SDKs; you don't call it)
PlanA 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

On this page