Cindy.Bang

Unable to add document to a package via HTTP - Internal Server Error

0 votes

Hi 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>


Attachments
Body_0.png62.54 KB
Test.txt152.38 KB

Reply to: Unable to add document to a package via HTTP - Internal Server Error

0 votes

Hi 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:

3-31-3_0.png

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Unable to add document to a package via HTTP - Internal Server Error

0 votes

Hi 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


Attachments
Image 27.png46.85 KB
Image 28.png21.98 KB

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off