Open Application Platform Docs

Errors

What a refused call means and what to check.

When a widget cannot load or a call is refused, the visitor sees a short message such as "This widget is not available." The cause goes to the page in two other ways:

[sWidget k2m9x7q4ab1c] origin_not_allowed (HTTP 403): This page's origin is not one of the widget's allowed websites …

sWidget.on('error', ({ code, status, widget, retry_after }) => { /* … */ });
CodeHTTPWhat to check
origin_not_allowed403The page's origin is not one of the widget's websites. Compare scheme, host and port exactly (www or not, http or https, the port) and add the origin on the widget's page in the back office.
invalid_app_key401The key is not valid: the widget was revoked, got a new key, or the sWidget app was stopped. Copy the snippet again.
invalid_client404data-client does not name the widget's client, or the sWidget app is switched off for the client in My Apps.
widget_call_not_allowed403The call is not one this widget type makes. Check that data-swidget and data-key belong to the same widget.
capability_disabled403A capability the widget needs is switched off for the sWidget app in My Apps: tracking, public quotes or guest shipping.
app_context_not_found404The client does not offer this through the sWidget app, for example guest shipping not set up.
widget_not_found404The widget id is unknown or belongs to another client. In the back office: the person may not open this staff widget.
widget_not_enabled_for_app403The widget's Apps channel does not list the calling app. Tick the app on the widget's page in the back office.
widget_revoked410The widget was revoked. Activate it again on its page in the back office.
widget_unsupported—The widget needs a newer sWidget version (a higher config_version or an unknown type). Update the package.
preview_read_only403A designer preview refused a write. The widget shows a sample answer marked Preview; nothing was created.
session_expired401 / 419Back office only: the session ended or the page's CSRF token is out of date. Sign in again and reload the page.
too_many_requests429More than 600 calls a minute for the widget, or 120 for one visitor, or a call's own limit. Retry-After says how many seconds to wait.
network_error—Superroute could not be reached: the network, data-api, a content blocker, or connect-src in the page's Content-Security-Policy.

When a widget shows "not available"

  1. Open the browser console and read the [sWidget] warning.
  2. Compare the page's address with the widget's allowed websites.
  3. Compare the snippet on the page with the one on the widget's page in the back office (key and client code).
  4. Check on the widget's page in the back office that the widget is active and that nothing is listed as missing.