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.

twaldron
  • 2,722
  • 7
  • 40
  • 55

1 Answers1

12

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

twaldron
  • 2,722
  • 7
  • 40
  • 55
  • 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. – user323774 Jul 18 '18 at 21:39
  • For reference, this should only be required if sending token via body, not headers. https://tools.ietf.org/html/rfc6750 – cloudsurfin Sep 02 '20 at 05:23