MuleSoft · HTTP Connector
HTTP:BASIC_AUTHENTICATION
Short answer
HTTP:BASIC_AUTHENTICATION means a request did not carry basic authentication, or carried the wrong credentials. Send a valid basic authentication header with the request.
VerifiedLast verified
01Error text
Error type: HTTP:BASIC_AUTHENTICATION02Likely causes
- The request operation lacks basic authentication.
- The basic authentication credentials are wrong.
03How to fix it
- Configure basic authentication on the HTTP Request configuration that calls the protected endpoint.
- Check the user name and password values for this environment.
- Turn on HTTP wire logging to see the exact request and response: in
log4j2.xml, enable the loggerorg.mule.service.http.impl.service.HttpMessageLoggeratDEBUGlevel. Confirm theAuthorizationheader is sent. - Handle the failure with an error handler of type
HTTP:BASIC_AUTHENTICATION.
04Official documentation
→Related errors
- HTTP:UNAUTHORIZEDHTTP:UNAUTHORIZED means the server rejected the HTTP Request operation because authentication failed or was not provided (HTTP 401). Send the credentials the server expects, and handle the error type if a rejected call is something the flow should survive.
- HTTP:SECURITYHTTP:SECURITY means the authentication of the HTTP requester failed. Check the authentication settings and credentials on the HTTP Request configuration.
- 401 Unauthorized or invalid client application credentialsAn API protected by the Client ID Enforcement policy returns 401 when the client application's credentials are missing, invalid or not authorized. The client needs an approved contract for the API and must send matching credentials on every request.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer