Troubleshooting HTTP 403 Forbidden error

Problem

When making a call to REST or SOAP API you may encounter this error:

Error: System.Net.WebException: The remote server returned an error: (403) Forbidden.

Possible cause

There can be several causes for this:

  • You provided the wrong authentication credentials, e.g.:
    • HTTP username or password
    • API key
    • Access or Refresh Token, etc.
  • Windows Server OS is configured to use less-than TLS 1.2 protocol

Solution

In SSIS package

  • If you are calling an API in SSIS package, make sure you are parameterizing sensitive data, i.e. authentication data like the password, API key or Refresh Token.

  • In rare cases, you may be getting this unrelated Forbidden (403) when the component failed to establish a secure TCP channel. In that case, you may test it by calling this PowerShell command:

    (Invoke-webrequest -URI “https://your-api.com/api/action”).Content

    If you get a TLS-related error, it means, it’s a hidden TLS issue. Solve it by:

    • Enabling TLS 1.2 or above protocol in Windows Server OS
    • Setting TLS v1.2 or higher option in SSIS connector:

    In API Source or API Destination look for TLS parameter after checking Show Advanced Parameters option.

In ODBC data source

  • If you are calling it in ODBC data source, double-check that the credentials are set correctly.

  • In rare cases, you may be getting this unrelated Forbidden (403) when the component failed to establish a secure TCP channel. In that case, you may test it by calling this PowerShell command:

    (Invoke-webrequest -URI “https://your-api.com/api/action”).Content

    If you get a TLS-related error, it means, it’s a hidden TLS issue. Solve it by:

    • Enabling TLS 1.2 or above protocol in Windows Server OS
    • Setting TLS v1.2 or higher option in ODBC data source:

    In API Connector-based data source look for TLS parameter after checking Show Advanced Parameters option.

Need more help?

If the above steps did not help, contact our support team via chat on our website.