I am encountering Error 500: Invalid License Key when using the library's RES API for merging annotations

Which product are you using?
PDF.js Express Plus

PDF.js Express Version

Detailed description of issue
As in the title, I am encountering Error 500 when using the REST API for merging annotations onto the PDF displayed and checking the payload, it says the the license key being used is invalid. I’ve double-checked the key I am passing with my boss who has purchased the license (I can provide proof of purchase) and copied exactly the code from the section in the documentation on merging annotations using the REST API.

Expected behaviour
A successful response with the required information to acquire the flattened PDF

Does your issue happen with every document, or just one?
It happens with every document I’ve tried.

Link to document
{Provide a link to the document in question if possible}

Code snippet
It is exactly like the one in the provided documentation.

const docViewer = instance.docViewer;
const annotManager = instance.annotManager;

const documentId = $('input:hidden[name="documentId"]').val();
const xfdf = await annotManager.exportAnnotations();
const fileData = await docViewer.getDocument().getFileData({});
const blob = new Blob([fileData], { type: 'application/pdf' });

const data = new FormData();
data.append('xfdf', xfdf);
data.append('file', blob);
data.append('license', 'license_key_here');

Hi there,

From the provided code, are you making a request to the REST APIs? Can you share the full code snippet (without the key)?

Please see our merge guide for reference:

Note that if you are using version 8 of pdf.js, you will want to use instance.Core instead of instance

Can you also share the full screenshot of the error and any failed network requests if any? The APIs should work even without a license, the result will just be mangled/not very readable.

Best regards,
Kevin Kim