Version 2.0 (2025)

EmbedChat.io Documentation

Welcome to the developer documentation. Learn how to integrate, customize, and extend EmbedChat.io using our modern 2025 stack.

Platform Integrations
Connect with Shopify, Slack, and more.
Widget API
Headless or UI-based widget controls.

Modern Architecture

Our SaaS is built on a high-performance, type-safe stack designed for scalability in 2025.

Async Python Core

Built with FastAPI and Python 3.11+, utilizing full async/await support for high-throughput concurrency.

Clean Architecture

Strict separation of concerns:
routersservicescrudmodels.

Shopify

Shopify App Integration

Our Shopify integration uses the OAuth 2.0 flow to securely connect merchants' stores.

Installation Flow

  1. 1

    Initiate Install

    Merchant clicks "Add App" in Shopify App Store.
  2. 2

    HMAC Verification

    Request hits /api/v1/integrations/shopify/install. We verify the HMAC signature to ensure the request is from Shopify.
  3. 3

    OAuth Redirect

    User is redirected to the Shopify authorization screen to grant scopes (e.g., read_products).
  4. 4

    Token Exchange

    Callback to /shopify/callback exchanges the code for a permanent access token.
Backend Implementation
@router.get("/shopify/callback")
async def shopify_callback(
    code: str, 
    shop: str, 
    hmac: str
):
    # 1. Verify HMAC
    if not verify_hmac(request.query, secret):
        raise HTTPException(400)

    # 2. Exchange code for token
    token = await exchange_token(shop, code)

    # 3. Register Webhooks
    await register_webhooks(shop, token)
    
    # 4. Redirect to Dashboard
    return RedirectResponse("/dashboard")

Webhook Compliance

We handle mandatory GDPR webhooks to ensure data privacy compliance.

Mandatory WebhooksRequired by Shopify
customers/data_request
Requests all data stored for a customer. We bundle their chat logs and metadata into a JSON file for export.
customers/redact
Request to delete all data for a customer. We scrub PII from chat logs and user records.
shop/redact
Request to delete all data for a shop (uninstall). We queue a job to wipe organization data after 48h.

Widget Installation

The widget is a lightweight, asynchronous JavaScript bundle that can be installed on any website.

Universal Script Tag
Place this code before the closing </body> tag.
<script>
  (function(){
    var s = document.createElement('script');
    s.src = "https://embedchat.io/widget.js";
    s.async = true;
    s.setAttribute('data-org', 'YOUR_ORG_ID_HERE');
    document.body.appendChild(s);
  })();
</script>
Async Loading

The widget loads asynchronously (async=true) so it never blocks your page render or affects Core Web Vitals.

Scoped CSS

All styles are encapsulated within a Shadow DOM to prevent conflicts with your existing site's CSS.

Last updated: December 2025

Go to Installation Settings