What types of responses does /userinfo return in case of errors?


#1

Hello everybody,

Could you please help me with /userinfo response type? I need to know what to expect in case of errors in order to handle them properly.

The two examples in the doc have the error responses that are not JSON.

I called the API with an invalid token parameter, and received non-JSON “HTTP 401 Unauthorized” response - the same as in the example. The errors details were in the response.headers.get("WWW-Authenticate").

  • Do all error responses from /userinfo have the "WWW-Authenticate" header with both error and error_description?
  • Is the error response body always empty?
  • Does /userinfo ever return JSON error response?

Thank you in advance!

Roni.