MuleSoft · HTTP Connector

HTTP:FORBIDDEN

Short answer

HTTP:FORBIDDEN means the server refused to return the resource because the client does not have access rights to it (HTTP 403). The credentials were sent, so fix the permissions of the identity behind them on the target system.

VerifiedLast verified

01Error text

MuleSoft error
Error type: HTTP:FORBIDDEN

02Likely causes

  • The server refuses to give the requested resource because the client does not have access rights to the content.
  • By default, HTTP Connector raises an error for any response with a status code of 400 or above.

03How to fix it

  1. Identify which identity the request authenticates as, then grant that identity access to the resource on the target system.
  2. Turn on HTTP wire logging to see the exact request and response: in log4j2.xml, enable the logger org.mule.service.http.impl.service.HttpMessageLogger at DEBUG level. Read the response body, which often says which permission is missing.
  3. Check that the request targets the resource you intended. A wrong path or ID can point at content the identity is not allowed to read.
  4. Handle the failure with an error handler of type HTTP:FORBIDDEN if the flow should continue when access is refused.

04Official documentation

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

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.