--- url: https://developer-portal.gainsight.com/docs/connectors/calling-from-widgets.md description: How to use the SDK to call connectors from widget code --- # Calling from Widget Code Call a connector by its [permalink](/connectors/configuration) using the [SDK](/sdk/). The SDK is loaded automatically by Customer Community and exposed on `window.WidgetServiceSDK` inside every widget — no script tag is required. The SDK sends the request to the backend connector instead of calling the destination API directly. See the [Widget SDK overview](/sdk/widget-sdk/overview) for constructor options. ## Call a connector Use `sdk.connectors.execute()` with the connector's permalink. The `method` parameter must match the HTTP method configured on the connector (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, or `OPTIONS`). A connector's permalink identifies a destination the community admin has already configured — including the target API and its credentials. Your widget code only references the permalink; it never chooses the destination or manages authentication for it. The `(async () => { ... })();` wrapper is required because widget `