Hi! I want to implement access token validation remotely and I’m pretty new to Okta stuff. How could I use introspect endpoint to do that in c#? My actual implementation looks like this:
var oktaTokenValidationResult = await oktaClient.PostAsync(new Okta.Sdk.HttpRequest
{
Uri = “/oauth2/v1/introspect”,
QueryParameters = new Dictionary<string, object>()
{
[“token”] = accessToken,
[“token_type_hint”] = “access_token”
},
Headers = new Dictionary<string, string>()
{
[“Accept”] = “application/json”,
[“ContentType”] = “application/x-www-form-urlencoded”
}
});
As a response, I receive a Bad Request: Okta.Sdk.Abstractions.OktaApiException: Bad request. Accept and/or Content-Type headers likely do not match supported values. (400,
Any suggestion would be helpful, Thank you in advance.