Hi. I found the followig information -
The behavior you are experiencing is due to a fundamental difference in how Test Connection vs. Actual Printing works in IFS Cloud.
Why "Test Connection" Works vs. Why "Printing" Fails
-
Test Connection (Uses IFS Connect Routing Address):
-
When you perform Test Connection, IFS executes the test through the IFS Connect framework.
-
This generates an Application Message and uses the Routing Address, where your custom x-api-key header is attached and sent to the endpoint.
-
Actual Printing (Bypasses IFS Connect):
-
During actual printing, the Print Manager / External Reports Gateway rendering engine makes a direct, synchronous HTTP/REST call from the print service/microservice to the external service URL.
-
Actual print rendering does NOT go through IFS Connect Application Messages or Routing Rules.
-
Because it bypasses IFS Connect, any Additional Headers defined on the Connect Routing Address are ignored.
-
Instead, the print engine sends the API Key configured in the External Reports Gateway settings using the hardcoded default header format:
Authorization: Bearer <key>
-
Since your external service expects x-api-key: <key> and rejects Authorization: Bearer <key>, the external service returns an HTTP 401/403 unauthorized response, which Print Manager logs as API key is invalid.
Recommended Solutions
To resolve this issue, you can use one of the following approaches:
Place an API Gateway or Reverse Proxy (such as Azure API Management, APISIX, or NGINX) between IFS Cloud and your external reporting service:
-
IFS Print Manager sends requests to the API Gateway with Authorization: Bearer <key>.
-
The API Gateway strips Authorization: Bearer and rewrites it to x-api-key: <key> before forwarding the request to your external service.
Option 2: Update the External Service to Accept Authorization: Bearer
Modify your external reporting service endpoint authentication logic to accept Authorization: Bearer <key> in addition to (or instead of) x-api-key.
Option 3: Route Printing via Report Rules & IFS Connect (If Applicable)
If your printing flow allows processing via IFS Connect (e.g., generating PDF output to an outbound channel rather than using direct synchronous rendering):
-
Configure a Report Rule to route the report output through an IFS Connect Outbound Routing Rule linked to your Routing Address.
-
This forces the print output through IFS Connect, ensuring the x-api-key additional header is included.
I hope this information helps. Thanks! Jane