getOauth2AccessToken

@POST(value = "/{productType}/oauth2/token/")
abstract suspend fun getOauth2AccessToken(@Path(value = "productType") productType: String, @Header(value = "Ocp-Apim-Subscription-Key") productSubscriptionKey: String, @Header(value = "X-Target-Environment") environment: 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.

environment

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