sqlmapproject/sqlmap · error · SqlmapConnectionException

not authorized, try to provide right HTTP authentication typ

Error message

not authorized, try to provide right HTTP authentication type and valid credentials (%d). If this is intended, try to rerun by providing a valid value for option '--ignore-code'

What it means

Error "not authorized, try to provide right HTTP authentication type and valid credentials (%d). If this is intended, try to rerun by providing a valid value for option '--ignore-code'" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/request/connect.py:928

            if code in conf.abortCode:
                errMsg = "aborting due to detected HTTP code '%d'" % code
                singleTimeLogMessage(errMsg, logging.CRITICAL)
                raise SystemExit

            if ex.code not in (conf.ignoreCode or []):
                if ex.code == TOO_MANY_REQUESTS_HTTP_CODE or (ex.code == _http_client.SERVICE_UNAVAILABLE and Connect._parseRetryAfter(responseHeaders) is not None):
                    retried = Connect._rateLimitRetry(responseHeaders, ex.code, **kwargs)
                    if retried is not None:
                        return retried
                    debugMsg = "target kept rate-limiting after %d retries (%d)" % (conf.retries, code)
                    logger.debug(debugMsg)
                elif ex.code == _http_client.UNAUTHORIZED:
                    errMsg = "not authorized, try to provide right HTTP "
                    errMsg += "authentication type and valid credentials (%d). " % code
                    errMsg += "If this is intended, try to rerun by providing "
                    errMsg += "a valid value for option '--ignore-code'"
                    raise SqlmapConnectionException(errMsg)
                elif chunked and ex.code in (_http_client.METHOD_NOT_ALLOWED, _http_client.LENGTH_REQUIRED):
                    warnMsg = "turning off HTTP chunked transfer encoding "
                    warnMsg += "as it seems that the target site doesn't support it (%d)" % code
                    singleTimeWarnMessage(warnMsg)
                    conf.chunked = kwargs["chunked"] = False
                    return Connect.getPage(**kwargs)
                elif ex.code == _http_client.REQUEST_URI_TOO_LONG:
                    warnMsg = "request URI is marked as too long by the target. "
                    warnMsg += "you are advised to try a switch '--no-cast' and/or '--no-escape'"
                    singleTimeWarnMessage(warnMsg)
                elif ex.code == _http_client.NOT_FOUND:
                    if raise404:
                        errMsg = "page not found (%d)" % code
                        raise SqlmapConnectionException(errMsg)
                    else:
                        debugMsg = "page not found (%d)" % code
                        singleTimeLogMessage(debugMsg, logging.DEBUG)
                elif ex.code == _http_client.GATEWAY_TIMEOUT:

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at lib/request/connect.py:928 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/c3f4afcea8dce2c9. Report an issue: GitHub.