MuleSoft · Rate Limiting: SLA-Based policy
401 Request blocked due to invalid client credentials (Rate Limiting: SLA-Based)
Short answer
An API protected by the Rate Limiting: SLA-Based policy returns 401 when the client ID or client secret is invalid. A client with no contract with the API is always rejected, so create the contract in API Manager and send its credentials.
VerifiedLast verified
01Error text
401 - Request blocked due to invalid client credentials (client ID or client secret) provided02Likely causes
- The client ID or client secret provided is invalid.
- A client that has no contract with the API is always rejected.
03How to fix it
- Confirm the client application has a contract with this API in API Manager. Create it if it does not.
- Check where the policy reads credentials from: Client ID Expression and, if set, Client Secret Expression.
- Send the client ID and secret in those locations and repeat the request.
04Official documentation
→Related errors
- 429 Quota exceeded (Rate Limiting: SLA-Based)An API protected by the Rate Limiting: SLA-Based policy returns 429 when the client application has used up the quota of its SLA tier for the current window. Wait for the window to finish, or move the client to a tier with a higher limit.
- 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.
- 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.
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