getOauth2AccessToken

@FormUrlEncoded
@POST(value = "/{productType}/oauth2/token/")
abstract suspend fun getOauth2AccessToken(@Path(value = "productType") productType: String, @Header(value = "Ocp-Apim-Subscription-Key") productSubscriptionKey: String, @Field(value = "grant_type") grantType: String = Constants.FormFields.CIBA_GRANT_TYPE, @Field(value = "auth_req_id") authReqId: String): Response<Oauth2AccessToken>

Obtains an OAuth2 access token for the specified product type.

Return

A Response containing the obtained Oauth2AccessToken.

Parameters

productType

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

productSubscriptionKey

The subscription key for the product.

grantType

The OAuth2 grant type; defaults to the CIBA grant (urn:openid:params:grant-type:ciba).

authReqId

The auth_req_id from a prior bcAuthorize call, exchanged for the OAuth2 token.