Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Hosted Connect Widget

What your users see when they open an AgentKit authorization link: OAuth consent or a credential form, scope choices, account states and errors.

The Hosted Connect Widget is the page your users land on when they open an authorization link. Scalekit hosts it, so the user’s OAuth consent, password or API key goes to Scalekit, not through your app. It adapts to the connection: OAuth connectors send the user to the app’s consent screen, and API key, basic auth and similar connectors show a form for the credentials. This page explains what users see and do in the widget, and what you control.

The widget opens as a full page in the user’s browser, not as a component you embed in your app. To make it look like your product, see Brand the Hosted Connect Widget.

The widget shows your logo and a headline that names your application and the app, such as “Acme wants to connect to your Gmail”. Under it are a short overview of the app, then either a Connect button or a form, and links to your terms of service and privacy policy.

Hosted Connect Widget for an OAuth connector: Acme Inc. wants to connect to your Notion, with a short description of Notion and a Connect button

What happens next depends on the connector’s auth type:

Auth typeWhat the user doesWhen the account becomes ACTIVE
OAuthSelects Connect, grants access on the app’s consent screen, and returns to the widgetWhen the app returns a token
API key, basic auth, bearer token and similarFills in the form and selects ConnectAs soon as the form is submitted. Scalekit doesn’t test the credential, so a wrong value shows up later as a failed tool call
Client credentials or Google domain-wide delegationFills in the form and selects ConnectAfter Scalekit gets a token from the app with the submitted values

The form fields come from the connector: their labels, hints and which ones are required. Secret fields, such as an API key or password, are masked as the user types. A required field can’t be left empty.

Hosted Connect Widget for an API key connector: Acme Inc. wants to connect to your Clari Copilot, with required API Key and API Password fields, each with a hint about where to find it

When the user is done, the widget shows Account connected successfully and the headline confirms the connection. The user stays on the widget page. Your app learns the result by checking the account’s status or from the connected_account.status_updated event.

For OAuth connectors, you can let users decide which of the connection’s scopes to grant. Turn on Allow users to choose scopes on the connection’s configuration, and mark the scopes your agent can’t work without as Required.

The widget then lists the scopes under “Choose what Acme can access in your Gmail”. Every scope starts selected. Users can clear the optional ones; required scopes stay selected. If a user clears everything, the widget warns that the app may reject the connection or apply its own defaults.

Hosted Connect Widget scope list: Choose what Acme Inc. can access in your Gmail, with two required scopes shown checked and disabled, and three optional scopes checked

Scalekit grants only the scopes the user kept, plus the required ones. Your agent’s tool calls that need a scope the user cleared fail with the app’s permission error, so mark a scope required when a tool you rely on needs it.

The widget shows the connected account’s current state each time the user opens a link:

Account statusWhat the widget shows
Not yet connectedThe Connect button or the credential form
ACTIVEThat the account is connected, with a Disconnect button. The user doesn’t need to connect again
EXPIREDRe-Authentication Required and a Reconnect button
PENDING_VERIFICATIONVerification pending: the user authorized, and your app still has to verify the user

Everything a user submits in the widget, whether OAuth tokens, an API key or a username and password, is stored the same way: encrypted with your environment’s key before it’s written. See How credentials are stored.

By default, your app doesn’t receive these values back. Your agent uses them through tool calls and the API proxy, and Scalekit adds the credential to each request. If your app needs the raw values, see Get a connected account’s credentials.

What you changeWhere
Your name, logo, colors, font and legal linksCustomize > Branding. See Brand the Hosted Connect Widget
The app name, overview and description for one connectionConnections > your connection > Widgets
The domain the widget is served fromCustom domain
Which scopes users can chooseAllow users to choose scopes on the connection, as above

The user opened the authorization link after it expired. Links last five minutes by default. Create a new link and send it when the user is ready to connect.

The connected account was deleted after the link was created. Create the connected account again, then create a new link.

The app didn’t issue a token after the user approved access. The usual causes are on the user’s side at the app: an administrator restricted the app with an access policy, the app isn’t approved in the user’s organization, or the user’s account lacks permission to authorize it. The user asks their administrator to allow the app, then opens a new link.

Expand the banner to see the error, its description and the auth request ID. Include them when you contact support.

The user opened the link with Scalekit users only user verification, and isn’t signed in to Scalekit in that browser. In production, use Custom user verifier instead. See Verify users.

The permissions available for this connection have changed

Section titled “The permissions available for this connection have changed”

The connection’s scopes changed while the user had the widget open. The user reloads the page and chooses again.