exposing-apis-to-widgets

Expose StickerNest services to widgets via permission-based Widget Protocol routing.

1|Updated Dec 28, 2025
One-click install
npx skills add https://github.com/Nymfarious/StickerNestV3 --skill exposing-apis-to-widgets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: exposing-apis-to-widgets
Source: https://github.com/Nymfarious/StickerNestV3/tree/main/.claude/skills/exposing-apis-to-widgets
Command: npx skills add https://github.com/Nymfarious/StickerNestV3 --skill exposing-apis-to-widgets

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Exposing StickerNest APIs to widgets through the Widget Protocol enables widgets to securely access social features, data, and actions without leaking tokens or bypassing permissions.

Core Features & Use Cases

  • Secure widget-host communication via window.postMessage using a defined Widget Protocol.
  • Permission-based routing and authentication checks to protect sensitive APIs such as social feeds, profiles, messaging, and storage.
  • Comprehensive host-side handlers for feed, profiles, social graph, chat, notifications, presence, and widget-scoped storage.
  • Real-time event subscriptions and forwarders to deliver timely updates to widgets while respecting user permissions.

Quick Start

Create a widget that uses WidgetAPI.request to access social APIs and ensure the widget manifest includes appropriate permissions.

Frequently Asked Questions about exposing-apis-to-widgets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely expose APIs to widgets using postMessage?

Securely exposing APIs to widgets uses window.postMessage with a defined Widget Protocol for permission-based routing and authentication checks. This prevents token leakage while granting widgets controlled access to social features, data, and actions.

How does permission-based routing work for widget API access?

Permission-based routing for widget API access validates widget manifest permissions before routing requests to host-side handlers. It enforces authentication checks across feed, profiles, messaging, and storage interactions to guard against unauthorized access.

What is the Widget Protocol for frontend-backend communication?

The Widget Protocol is a secure frontend-backend communication mechanism using window.postMessage. It defines how widgets request access to social APIs through manifest-based permissions, action routing, and robust error handling for host and widget interactions.

Can I use manifest-based permissions to restrict widget access to social features?

Manifest-based permissions restrict widget access to social features by requiring widgets to declare required permissions upfront. The host validates these permissions during authentication checks before enabling feed, profile, messaging, or storage handlers.

How do I handle real-time event subscriptions for widgets securely?

Real-time event subscriptions for widgets are handled through forwarders that deliver timely updates while respecting user permissions. The host-side event system routes updates to widgets only after validating manifest permissions and authentication status.

Why does my widget API request fail permission checks?

Widget API requests fail permission checks when the widget manifest lacks appropriate permissions for the targeted social APIs. The protocol enforces manifest-based permissions and authentication checks to guard against unauthorized access and misbehaving widgets.