Okta introspect method returning bad request
Asked Answered
S

1

7

trying to post to the introspect method is throwing a bad request error:

"Bad request.  Accept and/or Content-Type headers likely do not match supported values."

here is the url I am hitting

..oauth2/v1/introspect?token_type_hint=access&token={token}&client_id={ClientId}&client_secret={ClientSecret}"

I am setting the content-type and accept headers to "application/json"

If those are incorrect there is no documentation stating what they should be.

Sinfonietta answered 2/2, 2017 at 21:14 Comment(0)
S
12

Content-Type needed to be application/x-www-form-urlencoded.

Sinfonietta answered 2/2, 2017 at 22:52 Comment(2)
this is not working for me. granted my app is angular wrapped with cordova running on an android emulate, but I keep getting this error even though it works with postman.Versatile
For reference, this should only be required if sending token via body, not headers. tools.ietf.org/html/rfc6750Rocket

© 2022 - 2024 — McMap. All rights reserved.