Search & ads connections

Last updated: Sep 11, 2026Section: Integrations

Mailoo can store connection settings for Google Search Console, Google Ads, Microsoft Ads, and Bing Webmaster. This foundation is for saving and resolving credentials and property identifiers only. Mailoo does not call these providers yet (no Search Analytics, URL Inspection, Ads reports, or Bing API).

Hierarchy

Settings inherit from general to specific:

  • Project --- shared credentials and default property / Ads account IDs (dashboard project page → Search & ads connections)
  • Integration --- optional override on BLOG or MARKET (Connection & settings → Search & ads connections)

Resolution is field-split:

  • Secrets (refresh token, API key, developer token, service-account JSON) use the nearest non-empty scope (integration, else project).
  • Settings (siteUrl, Ads customer/account IDs) use the nearest non-empty scope independently.

A Blog may override only siteUrl and still use the project OAuth token. Missing required halves fail later when fetch is implemented --- there is no silent fallback to another user or project.

Storage

Rows live in search_ads_connections (not integration.config). Secrets are encrypted with MAIL_SMTP_ENCRYPTION_KEY (same AES-GCM helper as SMTP / stock photos). API responses expose only has* flags, never ciphertext.

Providers

  • GOOGLE_SEARCH_CONSOLE --- settings.siteUrl (https://
/ or sc-domain:example.com); secrets refreshToken and/or serviceAccountJson
  • GOOGLE_ADS --- settings.customerId, optional loginCustomerId; secrets refreshToken, developerToken
  • MICROSOFT_ADS --- settings.accountId, optional customerId; secrets refreshToken, developerToken
  • BING_WEBMASTER --- settings.siteUrl; secret apiKey

API (JWT dashboard)

Owner writes; editors may read sanitized values.

  • GET/PUT/DELETE /api/v1/projects/{uid}/search-ads-connections/{provider}
  • GET/PUT/DELETE /api/v1/projects/{uid}/integrations/{id}/search-ads-connections/{provider} (BLOG / MARKET only)
  • GET 
/search-ads-connections/{provider}/resolved --- effective settings plus inheritedFrom.secrets / inheritedFrom.settings (PROJECT | INTEGRATION | null)

PUT body: optional settings object and optional secrets object. Omit a secret field to keep the stored value; send "" to clear it.

UI

  • Project page (below Images, above Integrations)
  • Blog / Market Connection & settings tab (next to IndexNOW)

Out of scope (this foundation)

OAuth consent screens, provider API calls, SEO monitoring charts, and MCP tools are follow-ups.