Unable to add document to a package via HTTP - Internal Server Error
Wednesday, August 2, 2023 at 07:01amHi there,
I've been finishing through all the threads and guides but not sure what was wrong with my code. Please see attached txt file & screenshots.
I've used logic apps to convert the PDF file to base64 then base64tobinary.
Our objective is to use Logic App to create & send packages, however, we've are stuck at adding documents to package step.
----------------------------------------------------
Error message:
<html>
<head>
<title>Error</title>
</head>
<body>Internal Server Error</body>
</html>
Reply to: Unable to add document to a package via HTTP - Internal Server Error
Wednesday, August 2, 2023 at 09:37amHi Cindy,
Thanks for your post! Are you just testing your binary string with Postman? In a nutshell, your converted string works well, two proves:
(1)If I renamed the file to Test.pdf, it can be opened without problem
(2)I attached a Java script which can append the txt string to the request body, which works well with your document string.
PS: I had a similar experience when I directly entered document binary string in Postman and it turns out that Postman removes the first and last line breaks in the request body and therefore invalidates the request, see below screenshot:
Duo
Reply to: Unable to add document to a package via HTTP - Internal Server Error
Wednesday, August 2, 2023 at 06:45pmHi Duo,
Thank you for your response.
I've switched up the request body a little by following https://community.onespan.com/documentation/onespan-sign/guides/feature-guides/developer/uploading-deleting-documents#tab-header-2
Even though with the line breaks, it still comes back as Internal Server Error.
Cheers, Cindy