API Issues with XFDF Merge Endpoint: 500 Internal Server Error and 502 Bad Gateway

We are encountering persistent issues with the XFDF merge API endpoint:

Endpoint: https://api.pdfjs.express/xfdf/merge
HTTP Method: POST

Details:

  • Error on macOS:

    • Response: 500 Internal Server Error
    • Error message: “Server side request must use server side key”
    • Note: We are using a client key on our end.
  • Error on Windows:

    • Response: 502 Bad Gateway

Key Observations:

  • The endpoint was functioning as expected until recently.
  • No changes were made to our implementation before the errors began occurring.

Steps to Reproduce:

  1. Send a POST request to the endpoint: https://api.pdfjs.express/xfdf/merge.
  2. On macOS, observe the 500 Internal Server Error with the mentioned message.
  3. On Windows, observe the 502 Bad Gateway response.

Expected Behavior:

The API should process the POST request and return a successful response.

Actual Behavior:

The API fails with error responses as described above, which prevents us from merging XFDF data—a critical function for our application.

Attachments:

Hi there,

Based on the error code you are seeing, this is related to a license error.

Can you see if the issue persists when you do not provide a license key?
If you are using the Express Rest Utility API, you can use the method here:
https://pdfjs.express/api/utils/

Could you please check your express dashboard to see if there’s an issue with your billing portal?

Best regards,
Kevin

Hi @kkim,

Thanks for your response! We checked the billing portal, and everything seems to be working correctly on our end.

When we don’t provide the license key, we encounter a 502 Gateway Timeout instead of the 500 error. However, with the license key (which is valid and properly configured), the 500 error still occurs.

It seems this issue is specific to a particular document or form, as other documents/forms work fine. Could you please help us identify what might be causing this?

Hi there,

If this is happening to a specific file, then it may be larger than 5.5MB, as indicated in the body params here:

Best regards,
Kevin

Hi @kimm ,

Thank you for pointing that out. However, the file in question is around 300 KB, so it is well below the 5.5 MB limit mentioned. Could there be another reason for the issue? Please let me know if there’s anything specific you’d like me to check.

Hi there,

Could you please share the input file used? Does it show any errors when loading the PDF in another file reader?

Best regards,
Kevin