rotateTokenComplete

abstract suspend fun rotateTokenComplete(request: ISCIMRotateTokenCompleteParameters): SCIMRotateTokenCompleteResponse

Completes a SCIM bearer token rotation, activating the new token and invalidating the old one. Must be called after rotateTokenStart. Calls the POST /sdk/v1/b2b/scim/rotate/complete endpoint. Requires an active session.

Kotlin:

StytchB2B.scim.rotateTokenComplete(
SCIMRotateTokenCompleteParameters(
connectionId = "scim-connection-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
)
)

iOS:

let params = SCIMRotateTokenCompleteParameters(connectionId: "scim-connection-test-d5a3b680-e8a3-40c0-b815-ab79986666d0")
let response = try await StytchB2B.scim.rotateTokenComplete(params)

React Native:

StytchB2B.scim.rotateTokenComplete({ connectionId: "scim-connection-test-d5a3b680-e8a3-40c0-b815-ab79986666d0" })

Return

SCIMRotateTokenCompleteResponse confirming the new token is active.

Parameters

request
  • ISCIMRotateTokenCompleteParameters

  • connectionId — The ID of the SCIM connection whose rotation to complete.

Throws

StytchError

if no rotation is in progress or the request fails.

if the coroutine is cancelled.