What does the server return when response_type is missing or is one it does not understand?

Error response for a missing or unknown response_typeRFC 6749 §3.1.1MUSTRoles: authorization_server

Requirement as recorded in the ProtocolSoup registry

If an authorization request is missing the "response_type" parameter, or if the response type is not understood, the authorization server MUST return an error response as described in Section 4.1.2.1.

Read §3.1.1 in RFC 6749

Self-test verdict

PassCommit 00bac3fEvaluated

This is ProtocolSoup's result against its own implementation at the commit shown. It is not a certification of ProtocolSoup or of any other product.

Captured from production

Captured Commit 00bac3f

Captured from the deployed ProtocolSoup at the commit shown. Every request and response is shown exactly as sent and received.

Passing exchange

Accepted, as requiredConformance client

The conformance client sends public-app's authorization request to GET /oauth2/authorize: response_type=code, its client_id, a registered redirect_uri, scope and state, each once. The authorization server understands the response type and serves the sign-in page.

Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.

  1. 1.GET https://protocolsoup.com/oauth2/authorize?client_id=public-app&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&response_type=code&scope=profile&state=Q4gtrwu_eG5KPjNd3fZAiA200 OK

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    GET /oauth2/authorize?client_id=public-app&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&response_type=code&scope=profile&state=Q4gtrwu_eG5KPjNd3fZAiA HTTP/2.0
    Accept: text/html
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    

    Response

    HTTP/2.0 200 OK
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65ba455ae113cdb-MSP
    Content-Type: text/html
    Date: Sun, 06 Dec 2026 13:29:52 GMT
    Fly-Request-Id: 01M95RQWD9QQP5EV9QDWYYY578-ord
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=J6ujnh3OP8i1JmESKxMbDZ2iujuEFnUNAfmuzqhUYqtHJErg7tunIexwM6VBnFoeo3%2BSj6Na4%2FOvdmUobKlQNTTP9EHScggsmu87e1P0CLNJV6P76rD2MZgAgM3V%2BKUBDzk%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=3,cfOrigin;dur=223
    Speculation-Rules: "/cdn-cgi/speculation"
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <title>Login - Protocol Showcase</title>
        <style>
    
            * { box-sizing: border-box; margin: 0; padding: 0; }
            body {
                font-family: 'Segoe UI', system-ui, sans-serif;
                background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
                min-height: 100vh;
                display: flex;
                align-items: center;
                justify-content: center;
                color: #e4e4e7;
                padding: 16px;
            }
            .container {
                background: rgba(255, 255, 255, 0.05);
                backdrop-filter: blur(10px);
                border: 1px solid rgba(255, 255, 255, 0.1);
                border-radius: 16px;
                padding: 28px;
                width: 100%;
                max-width: 420px;
                box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            }
            @media (min-width: 480px) {
                body { padding: 0; }
                .container { padding: 40px; }
            }
            .logo {
                text-align: center;
                margin-bottom: 30px;
            }
            .logo h1 {
                font-size: 24px;
                font-weight: 600;
                color: #fff;
            }
            .logo p {
                color: #a1a1aa;
                font-size: 14px;
                margin-top: 8px;
            }
            .client-info {
                background: rgba(99, 102, 241, 0.1);
                border: 1px solid rgba(99, 102, 241, 0.2);
                border-radius: 8px;
                padding: 16px;
                margin-bottom: 24px;
                text-align: center;
            }
            .client-info span {
                color: #a5b4fc;
                font-size: 14px;
            }
            .client-info strong {
                color: #fff;
            }
            .form-group {
                margin-bottom: 20px;
            }
            label {
                display: block;
                font-size: 14px;
                font-weight: 500;
                margin-bottom: 8px;
                color: #d4d4d8;
            }
            input[type="email"], input[type="password"], input[type="text"] {
                width: 100%;
                padding: 12px 16px;
                border: 1px solid rgba(255, 255, 255, 0.1);
                border-radius: 8px;
                background: rgba(0, 0, 0, 0.2);
                color: #fff;
                font-size: 16px;
                transition: all 0.2s;
            }
            input:focus {
                outline: none;
                border-color: #6366f1;
                box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
            }
            button {
                width: 100%;
                padding: 14px;
                background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
                border: none;
                border-radius: 8px;
                color: #fff;
                font-size: 16px;
                font-weight: 600;
                cursor: pointer;
                transition: transform 0.2s, box-shadow 0.2s;
            }
            button:hover {
                transform: translateY(-2px);
                box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.5);
            }
            .error {
                background: rgba(239, 68, 68, 0.1);
                border: 1px solid rgba(239, 68, 68, 0.2);
                color: #fca5a5;
                padding: 12px;
                border-radius: 8px;
                margin-bottom: 20px;
                font-size: 14px;
            }
            .demo-users {
                margin-top: 24px;
                padding-top: 24px;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
            }
            .demo-users h3 {
                font-size: 14px;
                color: #a1a1aa;
                margin-bottom: 12px;
            }
            .demo-user {
                background: rgba(0, 0, 0, 0.2);
                border: 1px solid rgba(255, 255, 255, 0.05);
                border-radius: 8px;
                padding: 12px;
                margin-bottom: 8px;
                cursor: pointer;
                transition: all 0.2s;
            }
            .demo-user:hover {
                background: rgba(99, 102, 241, 0.1);
                border-color: rgba(99, 102, 241, 0.2);
            }
            .demo-user .name {
                font-weight: 500;
                color: #fff;
            }
            .demo-user .email {
                font-size: 12px;
                color: #71717a;
            }
            .scopes {
                margin-top: 16px;
                font-size: 12px;
                color: #71717a;
            }
            .scopes span {
                display: inline-block;
                background: rgba(99, 102, 241, 0.1);
                padding: 4px 8px;
                border-radius: 4px;
                margin: 2px;
            }
    
        </style>
    </head>
    <body>
        <div class="container">
            <div class="logo">
                <h1>Protocol Showcase</h1>
                <p>OAuth 2.0 Authorization</p>
            </div>
            
            <div class="client-info">
                <span>Signing in to <strong>Public Application (SPA)</strong></span>
            </div>
    
            <!-- ERROR -->
    
            <form method="POST" action="/oauth2/authorize">
                <input type="hidden" name="login_request_id" value="-gkTv_tAdixt4C_Gk8yY0w">
                
                <div class="form-group">
                    <label for="email">Email</label>
                    <input type="email" id="email" name="email" placeholder="[email protected]" required>
                </div>
                
                <div class="form-group">
                    <label for="password">Password</label>
                    <input type="password" id="password" name="password" placeholder="password" required>
                </div>
                
                <button type="submit">Sign In</button>
            </form>
    
            <div class="demo-users"><h3>Demo Users (click to autofill)</h3><div class="demo-user" data-email="[email protected]" data-password="4bbw3nqtTsR9az7s2albdeeu" onclick="fillCredentials(this.dataset.email || '', this.dataset.password || '')"><div class="name">Alice (Standard User)</div><div class="email"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b2d3dedbd1d7f2d7cad3dfc2ded79cd1dddf">[email&#160;protected]</a></div></div><div class="demo-user" data-email="[email protected]" data-password="6PdvnYFdfrvoyxTXbzmHF9c1" onclick="fillCredentials(this.dataset.email || '', this.dataset.password || '')"><div class="name">Bob (Standard User)</div><div class="email"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5b3934391b3e233a362b373e75383436">[email&#160;protected]</a></div></div><div class="demo-user" data-email="[email protected]" data-password="ETi7vCbBBwojO-wKkmBZp81Q" onclick="fillCredentials(this.dataset.email || '', this.dataset.password || '')"><div class="name">Admin (Elevated Permissions)</div><div class="email"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0263666f6b6c42677a636f726e672c616d6f">[email&#160;protected]</a></div></div></div>
    
            <div class="scopes">
                Requested scopes: <span>profile</span>
            </div>
        </div>
    
        <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script>
            function fillCredentials(email, password) {
                document.getElementById('email').value = email;
                document.getElementById('password').value = password;
            }
        </script>
    <script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a65ba455ae113cdb',t:'MTc5NjU2Mzc5Mg=='};var l=window.parent.location,o;try{o=new URL(l.origin).origin}catch(e){try{o=new URL(new URL(l.href).origin).origin}catch(e){o=''}}var u='/cdn-cgi/challenge-platform/scripts/jsd/main.js?ray=a65ba455ae113cdb',a=document.createElement('script');a.src=o?new URL(u,o).href:u;document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script><script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/vce701823e78c4301a35b7e07294d87301792088814092" integrity="sha512-UKNk8GbxkABxKcXYuLkO16EleLGUkcvJWtpSNmExE0Too3ZaFAxTscNWEc1OdAv5/BikHawapSCaiD2XCmp+Bw==" data-cf-beacon='{"version":"2024.11.0","token":"4e68ea7d404d48c4b57e5a383f411883","spa":2}' crossorigin="anonymous"></script>
    </body>
    </html>

Failing exchange

Rejected, as requiredConformance client

The conformance client sends public-app's authorization request without response_type, and again with response_type=id_token, which this authorization server does not understand. Each is answered with an error response in the query component of the redirect_uri, as Section 4.1.2.1 describes.

Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.

  1. 1.GET https://protocolsoup.com/oauth2/authorize?client_id=public-app&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&scope=profile&state=jRe546AHYXyrY3XJ98WIeg302 Found

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    GET /oauth2/authorize?client_id=public-app&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&scope=profile&state=jRe546AHYXyrY3XJ98WIeg HTTP/2.0
    Accept: text/html
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    

    Response

    HTTP/2.0 302 Found
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65ba45bd96a3cdb-MSP
    Content-Type: text/html; charset=utf-8
    Date: Sun, 06 Dec 2026 13:29:53 GMT
    Fly-Request-Id: 01M95RQXBK6RMZ4GB1P9G3DK27-ord
    Location: https://protocolsoup.com/callback?error=invalid_request&error_description=response_type+is+required&iss=https%3A%2F%2Fprotocolsoup.com%2Foauth2&state=jRe546AHYXyrY3XJ98WIeg
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=goCgPvQCghtV7q2rk2pk7NSy4d6ekIQYc7dOrODYWSZ8daykriy6D3kLNXjp3nQ9Q5XpNBAhxlL%2B5h0WZY%2BELushVO%2BvOSVrNHSTlK4%2BN9pZ7EXlnSMsG60znqwtRabfmWo%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=3,cfOrigin;dur=197
    Speculation-Rules: "/cdn-cgi/speculation"
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    <a href="https://protocolsoup.com/callback?error=invalid_request&amp;error_description=response_type+is+required&amp;iss=https%3A%2F%2Fprotocolsoup.com%2Foauth2&amp;state=jRe546AHYXyrY3XJ98WIeg">Found</a>.
    
    
  2. 2.GET https://protocolsoup.com/oauth2/authorize?client_id=public-app&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&response_type=id_token&scope=profile&state=OOqyjJIZsORy3RVelBeALA302 Found

    TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2

    Request

    GET /oauth2/authorize?client_id=public-app&redirect_uri=https%3A%2F%2Fprotocolsoup.com%2Fcallback&response_type=id_token&scope=profile&state=OOqyjJIZsORy3RVelBeALA HTTP/2.0
    Accept: text/html
    Host: protocolsoup.com
    User-Agent: ProtocolSoup-Conformance-Client/1
    
    

    Response

    HTTP/2.0 302 Found
    Cache-Control: no-store
    Cf-Cache-Status: DYNAMIC
    Cf-Ray: a65ba4621e8a3cdb-MSP
    Content-Type: text/html; charset=utf-8
    Date: Sun, 06 Dec 2026 13:29:54 GMT
    Fly-Request-Id: 01M95RQYBXVWKNKBVR3HQWZCMB-ord
    Location: https://protocolsoup.com/callback?error=unsupported_response_type&error_description=Only+the+code+and+token+response+types+are+supported&iss=https%3A%2F%2Fprotocolsoup.com%2Foauth2&state=OOqyjJIZsORy3RVelBeALA
    Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
    Referrer-Policy: strict-origin-when-cross-origin
    Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=dNsS4TKIeIL%2BzOQ596l%2BbZp8QMbSrmskLkcTNpQUsrLcMUzgtyZ4%2BIRnTWj5L6uJFhix6OQdYdWssZ1Itq2FrBog50etEnNhIHfTqcWexrUMTuxUlAuAD7IV6d4i2UTbvlQ%3D"}]}
    Server: cloudflare
    Server-Timing: cfCacheStatus;desc="DYNAMIC"
    Server-Timing: cfEdge;dur=3,cfOrigin;dur=228
    Speculation-Rules: "/cdn-cgi/speculation"
    Vary: Origin
    Vary: accept-encoding
    Via: 1.1 fly.io, 1.1 fly.io
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Xss-Protection: 1; mode=block
    
    <a href="https://protocolsoup.com/callback?error=unsupported_response_type&amp;error_description=Only+the+code+and+token+response+types+are+supported&amp;iss=https%3A%2F%2Fprotocolsoup.com%2Foauth2&amp;state=OOqyjJIZsORy3RVelBeALA">Found</a>.
    
    

Run it live

Looking Glass runs the flow that sends the message this requirement governs, against the same server, and decodes each exchange as it happens.

Open the flow in Looking Glass

Tests

Implementation

Explainer

What this requires

The server returns an error response of the kind Section 4.1.2.1 describes: a redirect to the client's redirection URI with error and, if the request had one, state. A missing response_type is invalid_request. One the server does not support is unsupported_response_type.

Section 3.1.1 defines the parameter: "The value MUST be one of "code" for requesting an authorization code as described by Section 4.1.1, "token" for requesting an access token (implicit grant) as described by Section 4.2.1, or a registered extension value as described by Section 8.4."

The reference to Section 4.1.2.1 also settles where the error goes. That section adds the parameters "to the query component of the redirection URI". Without a usable response_type the server cannot know the client wanted a fragment response, and the authorization code error format is the one named.

This applies once the client and its redirection URI have been validated. If they have not, the earlier rule of the same section holds and there is no redirect.

Why it exists

response_type selects the flow. A server that guesses when it is missing may run a flow the client did not ask for, and the client then waits for a code and receives a token, or the reverse. Returning the error to the client lets its developer see the mistake at the callback, where they are looking.

What non-compliance looks like

Defaulting to code when the parameter is absent. Showing an error page to the user and never telling the client. Or returning the error in the fragment, where a server-side client that reads only the query never sees it.

How ProtocolSoup tests it

/oauth2/authorize understands code and token. For response_type=id_token it answers 302 with Location set to the redirect URI followed by ?error=unsupported_response_type&error_description=Only+the+code+and+token+response+types+are+supported, then iss and the request's state. With the parameter missing the error is invalid_request and the description response_type is required.

TestMissingOrUnknownResponseTypeIsAnErrorInTheQueryComponent covers an unknown value, a missing parameter and an empty one. Each must redirect to the registered URI with the error in the query, no fragment, and the original state. The same unknown value with an unregistered redirect_uri must not redirect at all.

The captured passing exchange is response-type-code. The failing one, missing-or-unknown-response-type, records both redirects.

Related requirements

All RFC 6749 requirements · OAuth 2.0 protocol page