You get an unsupported response type error

In the OAuth world, the response_type parameter (used in an authorization request) lets the server know what you’d like to get back if your request is approved (for example, you’d like to get back an authorization code or you’d like to get back an access token). OAuth supports a number of different response types, including:

  • code
  • code id_token
  • code id_token token
  • code token
  • id_token
  • id_token token
  • none
  • token

So what does it mean if you get an error message like this:

imgimg

There’s actually an easy answer to this question. In your authorization request, you must include the response_type parameter:

https://v1.api.us.janrain.com/e0a70b4f-1eef-4856-bcdb-f050fee66aae/login/authorize
   ?client_id=a123ef65-83dc-4094-a09a-76e1bec424e7
   &redirect_uri=https://wacky-harmonious-bike.dev.or.janrain.com/redirect_uri
   &scope=openid
   &code_challenge=VYPgdaX9YD1bphl3mkyNj_BkVkn6FF-rYwJTZtW5m30
   &code_challenge_method=S256
   &response_type=code
   &state=J2aS_DZ6DwQMEsAAAwG7KEsUCORcJO2XLW4Bl8ox31M

Equally important, the response_type parameter must be set one of the valid response types supported by Hosted Login. You can verify that by doing what the error message suggests and checking your discovery document:

"response_types_supported": [
    "code",
    "id_token",
    "token",
    "none",
    "code id_token",
    "code token",
    "id_token token",
    "code id_token token"
  ],

That also means there’s an easy fix here: just set the response_type parameter to a valid value. For example:

&response_type=code

That’s all you have to do .


Did this page help you?