getOauthAccessToken

fun getOauthAccessToken(productType: String, productSubscriptionKey: String, environment: String, backChannelAuthorizationRequestId: String): ERROR CLASS: Symbol not found for Flow<io/rekast/sdk/repository/data/NetworkResult<io/rekast/sdk/model/authentication/Oauth2AccessToken>>

Obtains an OAuth2 access token for use with consent-based API endpoints.

Always uses the CIBA grant (grant_type=urn:openid:params:grant-type:ciba), which requires a valid auth_req_id from a prior bcAuthorize call. Passing a blank backChannelAuthorizationRequestId is a programming error: the method emits NetworkResult.Error immediately rather than forwarding an invalid request to the server.

Return

A Flow emitting NetworkResult.Error immediately if backChannelAuthorizationRequestId is blank, otherwise emitting NetworkResult.Loading then a terminal NetworkResult.Success or NetworkResult.Error from the network call.

Parameters

productType

The type of product for which to obtain the OAuth2 access token.

productSubscriptionKey

The subscription key for the product.

environment

The target environment (e.g., sandbox or production).

backChannelAuthorizationRequestId

The auth_req_id returned by a prior bcAuthorize call. Must not be blank.