Skip to main content
Connect sessions are short-lived tokens your backend generates to open the Integration Hub for a specific end user. Because they’re generated server-side using your API key, your key is never exposed to the frontend. You’ll need a StackOne API key to call the Connect Sessions endpoint.

Required fields

These two fields combined with provider determine whether a new account is created or an existing one is updated. If the same combination has been used before, the existing account opens in edit mode. If not, a new account is created.
Always set origin_owner_id server-side. Never pass it through from a client-side request.

Optional fields

If no connector_profile_id is passed, the connect session is created against the default connector profile for the given provider. You can set the default connector profile from the Connector Profiles page.
provider_version is deprecated. Passing it no longer selects a connector version and can cause session creation to fail. Remove it from your requests. To target a specific connector profile, use connector_profile_id instead.

Basic implementation

Account behavior

Multiple accounts for the same provider

By default, creating a connect session with an origin_owner_id and origin_owner_name combination that already exists for a given provider will open that existing account in edit mode rather than create a new one. If you need multiple linked accounts for the same provider under the same origin_owner_id — for example if a single customer connects several separate instances of the same tool — pass multiple: true. This creates a new account each time regardless of any existing ones with matching details.
multiple has no effect when account_id is set. When account_id is present the session always opens that specific account in edit mode.

Targeting a specific connector profile

Passing provider alone creates a session using the project’s default connector profile for that provider. This is the right choice for most cases — if you only have one profile per provider, or want users going through the standard flow, you don’t need anything else. Each connector profile has a version pin controlling which connector version its linked accounts use. When you issue a connect session, the linked account that results from it is tied to the profile the session was created against — and inherits that profile’s version pin. This is how connector version migration works in practice: you create a new connector profile pinned to the new version, then issue connect sessions with that profile’s connector_profile_id so users authenticate against the new profile. When they reconnect, their account moves to the new version. To route a session to a specific connector profile — for example when you have multiple profiles for the same provider, or you’re migrating end users to a new connector version — pass its connector_profile_id. Get the ID by calling GET /connector_profiles and using the id field from the connector profile you want to target:
Then pass it in the session request:
This is most commonly used when migrating end users to a new connector major version that requires reauthentication. See Connector Version Management for the full migration flow.

Customizing the Hub Behavior