Skip to main content

What it is

Mellowtel will not share a single byte of bandwidth until the user has explicitly opted in, and the user must always have an obvious way to opt back out. This is a hard requirement of the SDK and a hard requirement of every browser store policy that allows Mellowtel-based extensions.

Why it matters

It’s the user’s bandwidth. Anything less than explicit, revocable consent is both unethical and grounds for store removal. The SDK is designed so the easy path is also the compliant path. If you follow the recommended implementation, you cannot accidentally ship a version that activates without consent.

How it works

On first install (and on any update that newly introduces Mellowtel) you must show the user a non-dismissible disclaimer that explains what Mellowtel does, then capture their choice. From then on, a settings link must be reachable from somewhere obvious in your UI so they can change their mind.
You have two implementation options:
  1. Recommended: open the pre-built Mellowtel opt-in page with generateAndOpenOptInLink(). One method call, fully compliant, maximizes opt-in conversion.
  2. Custom UI: build your own consent surface and call optIn() / optOut() yourself.

API surface

MethodReturnsUse it to
generateAndOpenOptInLink()Promise<void>Open the hosted opt-in page (recommended path).
getOptInStatus()Promise<boolean>Check whether the user has already opted in.
optIn()Promise<void>Record consent from your own UI.
optOut()Promise<void>Revoke consent from your own UI.
start()Promise<void>Begin serving requests after opt-in.
generateSettingsLink()Promise<string>URL to the hosted settings page so users can change their choice later.
All methods are accessible from any part of your extension: popup, content script, or background script. The full integration walkthrough lives in the platform quickstarts. They show where to put the SDK, how to wire it into the install/update lifecycle, and how to test it: In short, after new Mellowtel(...) and initBackground(), call generateAndOpenOptInLink() from your install/update handler. That’s it.

Custom UI

If you want full control over the consent surface, capture the user’s choice in your own UI and forward it to the SDK:
// User agreed
await mellowtel.optIn();
await mellowtel.start();

// User declined or later revoked
await mellowtel.optOut();

// Check status (e.g. to render a toggle)
const hasOptedIn = await mellowtel.getOptInStatus();
Whatever UI you build, it must:
  1. Be non-dismissible on first install.
  2. Default to opted out until the user actively agrees.
  3. Be re-openable from somewhere obvious in your product so users can change their choice.
Users must always have an easy way to change their settings. Use generateSettingsLink() to get a URL to the hosted settings page and place it somewhere persistent: your popup, an options page, an account screen.
const settingsUrl = await mellowtel.generateSettingsLink();

Announcing Mellowtel to existing users

If you are adding Mellowtel to an extension that already has users, you need to tell them what changed before asking for consent. We provide a copy-paste announcement template you can adapt.
  • Privacy: what users are actually agreeing to share.
  • Rate Limiting: how the SDK protects users who do opt in.