Kong/insomnia · error · Error
unknown response type for oauth2: "${inputResponseType}", it
Error message
unknown response type for oauth2: "${inputResponseType}", it could be: 'code' | 'id_token' | 'id_token token' | 'none' | 'token' | '' What it means
Error "unknown response type for oauth2: "${inputResponseType}", it could be: 'code' | 'id_token' | 'id_token token' | 'none' | 'token' | ''" thrown in Kong/insomnia.
Source
Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:515
}
case 'refresh_token': {
return 'refresh_token';
}
default: {
throw new Error(
`auth transforming(fromPreRequestAuth): unknown auth grant type for oauth2: ${inputGrantType}`,
);
}
}
})();
const responseType = ((): OAuth2ResponseType => {
const inputResponseType = findValueInOauth2Options('response_type', authObj.oauth2);
// responseType is currently always set to '' in our request auth model, this should be investigated what is correct to be set
if (['code', 'id_token', 'id_token token', 'none', 'token', ''].includes(inputResponseType)) {
return inputResponseType as OAuth2ResponseType;
}
throw new Error(
`unknown response type for oauth2: "${inputResponseType}", it could be: 'code' | 'id_token' | 'id_token token' | 'none' | 'token' | ''`,
);
})();
return {
type: 'oauth2',
disabled: findValueInOauth2Options('disabled', authObj.oauth2) === 'true',
grantType: grantType,
authorizationUrl: findValueInOauth2Options('authUrl', authObj.oauth2),
accessTokenUrl: findValueInOauth2Options('accessTokenUrl', authObj.oauth2),
clientId: findValueInOauth2Options('clientId', authObj.oauth2),
clientSecret: findValueInOauth2Options('clientSecret', authObj.oauth2),
scope: findValueInOauth2Options('scope', authObj.oauth2),
code: findValueInOauth2Options('code_verifier', authObj.oauth2),
accessToken: findValueInOauth2Options('accessToken', authObj.oauth2),
pkceMethod: findValueInOauth2Options('challengeAlgorithm', authObj.oauth2),
usePkce: findValueInOauth2Options('grant_type', authObj.oauth2) === 'authorization_code_with_pkce',
username: findValueInOauth2Options('username', authObj.oauth2),View on GitHub (pinned to d9bb2b0142)
When it happens
Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/auth.ts:515 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26).
Data as JSON: /api/errors/6e54121756d348f9.
Report an issue: GitHub.