Skip to content
SazM AI Agents, Modern Web & Fixes
Quick search
What needs fixing or building?

Type a symptom (e.g. 502, white screen, hacked, slow ttfb) or a service.

Use arrow keys to browse, Enter to select, and Escape to close.

20 matching options

Client Login Get a fix →

Bug Fixing · 4 min read

AI Chatbot Widget Broken on WordPress (CORS / Nonce / 403): Fix Guide

Fix AI chatbot widgets broken on WordPress with 403 rest_cookie_invalid_nonce, CORS errors, or cache-stale nonces using proper REST endpoints and server-side proxying.

Summary

When an AI chatbot widget on WordPress stops replying with 403 Forbidden (rest_cookie_invalid_nonce), CORS policy: No 'Access-Control-Allow-Origin', or a spinner that never resolves, the cause is usually page-cache stale nonces, a REST API block from a security plugin, or an unproxied OpenAI/Anthropic call.

If you want this fixed without breaking your theme or cache, SazM repairs broken WordPress AI chatbot widgets for a fixed $99, delivered within 48 hours, 100% in writing with zero calls. See our AI integration services or request the $99 fix.

Full-page caching (Cloudflare, WP Rocket, LiteSpeed Cache) serves yesterday's wp_rest nonce to today's visitors, causing 403 on /wp-json/...:

  • For public visitor chat endpoints, use permission_callback => '__return_true' paired with server-side rate limiting and Turnstile/honeypot checks instead of a cached wp_rest nonce.

2. CORS & Security Plugin Blocks

  • Never call OpenAI or Anthropic directly from browser JavaScript (which exposes your API key and hits CORS). Proxy requests through a WordPress REST route or a Cloudflare Worker.
  • Whitelist your chatbot REST namespace in Wordfence, Cloudflare WAF, or iThemes Security if it triggers 403 on POST.

Need It Fixed?

We combine 20+ years of WordPress/PHP production experience with production AI agent, Workers AI, and 5-tool MCP server (sazm.in/mcp) engineering—fixing broken WordPress AI widgets for a fixed $99 within 48 hours, verified before you pay and 100% async. Start your $99 fix or explore our AI integration services.

Engagement tracks · Fixed scope or monthly plan

Senior Engineering Without Agency Overhead

Track A · Fixed-price fixes (48h SLA)

Single Urgent or Speed Fix

Immediate code-level fixes with zero discovery calls. Emergency root-cause patch within 48 hours for $99, or full Core Web Vitals & speed remediation with before/after audit for $199. 100% money back if the agreed root cause cannot be fixed.

Running WordPress or WooCommerce? The website care plan keeps your site updated, hardened, backed up daily, and monitored for $49/mo.

Track B · Ongoing capacity & builds

Monthly Plan or Custom Scope

Direct senior-level capacity embedded in your stack. Dedicated monthly engineering ($999/mo, 1 active task at a time, 24–48h PR delivery, pause or cancel anytime), or fixed-scope architectural milestones delivered within a 24h written quote.

✓ 20+ years engineering ✓ 100+ projects in the portfolio ✓ Fixes within 48 hours ✓ 100% money back if not fixed
1 Active Task at a Time
Requests are completed one by one in your priority order. As soon as an active task is shipped, tested, and approved, work starts immediately on your next task within our 24–48h SLA.
48h Emergency SLA
Clock starts as soon as site access details are provided. Delivered with full backup taken first, isolated staging testing, and 100% money back if not fixed.
Website Care Plan Scope
Weekly core and plugin updates pre-tested in staging, daily offsite encrypted backups, 24/7 uptime monitoring, and proactive security patching.
Pay Nothing Upfront
Zero upfront payment or credit card required. A 20-Year Senior Engineer diagnoses your issue, reproduces it on isolated staging, and deploys the fix. You only pay once you verify the staging reproduction or production fix.