createConnection

abstract suspend fun createConnection(request: IB2BSCIMCreateConnectionParameters): B2BSCIMCreateConnectionResponse

Creates a new SCIM connection for the organization. Calls the POST /sdk/v1/b2b/scim endpoint. Requires an active session.

Kotlin:

StytchB2B.scim.createConnection(
B2BSCIMCreateConnectionParameters(displayName = "Okta SCIM")
)

iOS:

let params = B2BSCIMCreateConnectionParameters(displayName: "Okta SCIM")
let response = try await StytchB2B.scim.createConnection(params)

React Native:

StytchB2B.scim.createConnection({ displayName: "Okta SCIM" })

Return

B2BSCIMCreateConnectionResponse containing the newly created SCIM connection and its bearer token.

Parameters

request
  • IB2BSCIMCreateConnectionParameters

  • displayName — Human-readable label for the SCIM connection.

  • identityProvider? — The identity provider type (e.g. "okta", "generic").

Throws

StytchError

if the request fails.

if the coroutine is cancelled.