Skip to main content

Using Hyperspell Connect

Hyperspell Connect is a feature that allows your users connect their accounts to Hyperspell. To do so, you need to open https://connect.hyperspell.com with a User Token as a query parameter. Typically that involves putting a button in your app that looks like this:
<a href="https://connect.hyperspell.com?token=<user_token>">Connect your accounts</a>
<p>This app uses Hyperspell to securely connect your accounts.</p>
Hyperspell connect can be opened in a new tab, in an iFrame, or a web view for mobile apps. On the Hyperspell Connect page, your users will see a list of integrations you have enabled for your app, and they can choose which ones they want to connect to:
Hyperspell Connect Example
You can find out which integrations a user has connected to by calling the GET /auth/me endpoint with the user token or using the SDK. After a user has connected an integration, you can query the data right away.

Configuration

There are several URL parameters that you can use to configure Hyperspell Connect.
token
string
required
The User Token to identify your app and user.
redirect_uri
string
If set, the Connect page will show a button to return to your app. You can also set the Redirect URI in the settings page on the Hyperspell dashboard. If the redirect_uri URL parameter is set, it will override the Redirect URI in the settings page.
autoclose
boolean
default:false
If a redirect_uri is provided, the Connect page will automatically close and return to the redirect_uri when the user has connected all integrations.
font
string
Specify a custom font to use for the Connect page to match your app’s branding. You can use web-safe defaults such as system-ui (on iOS devices), sans-serif for the browser’s default font, or any font from Google Fonts, such as Roboto or Open+Sans+3 (Notice the + in the name instead of spaces).
You can configure the link to your Connect page here:

Directly connecting accounts

Instead of using the Hyperspell Connect interface, you can also directly start the flow to connect an account. To do so, you first need to get the ID of the integration you want to connect to. You can find the ID of an integration in Dashboard, or you can programmatically get the ID of an integration using the GET /integrations/list endpoint. To connect an account, simply direct your user to the following URL:
https://connect.hyperspell.com/link/<integration_id>?token=<user_token>&redirect_uri=<redirect_uri>
The user token is the same as you would use to open the Connect page. While the redirect_uri is optional, it’s recommended to set it to your app’s URL so that the user is redirected back to your app after the connection is complete. You can also generate a link to connect an account using the GET /integrations/<integration_id>/link endpoint, which will generate an URL with a temporary token that can be used to connect an account. This endpoint is also available as a tool in the MCP Server, allowing your agents to programmatically connect an account on demand.

How it works

As soon as the user has connected a data source, Hyperspell will automatically ingest and index data from that source. Technically, the authorization flow with Hyperspell connect looks like this: