How to give file URL hosted in s3 as a document remoteUrl for Dousign remote signing API? - docusignapi

Im trying to give my s3 file's url as a document remoteUrl in remote signing API. As it becomes easy to do this way, instead of downloading the file to my server and then pass on the doc to docusign API. When I made the bucket public, I was able to pass the object url as document remoteUrl and docusign was able to pick it up and send it for signature but my usecase is not a public bucket.
The s3 bucket only allows allowed domains, so I have added "https://account-d.docusign.com/" "https://account.docusign.com/" as allowed domains but even then I am facing this issue :
ERROR {errorCode: 'INVALID_REQUEST_PARAMETER',message: "The request contained at least one invalid parameter. An error occurred while downloading the data for document with id=1. Please ensure that the 'remoteUrl' parameter is correct."}
Are the docusign allowed domains correct or am I missing something?

OK, let's clear some confusion here.
First, DocuSign support various public cloud providers for cloud storage where you can have the files stored that will be sent to DocuSign to be part of an envelope sent for signature.
That list doesn't include Amazon S3, it is focused on end-user/consumer cloud storage and requires that you connect your DocuSign account to the cloud provider for authentication.
So the remoteURL property is not relevant to your scenario.
You can build an integration that goes to S3 using AWS APIs, get the file and then send it to DocuSign from wherever your app is hosted (AWS would make it easy) and if you do that - there's nothing different about sending a file you obtained from Amazon S3 vs. a file that was stored on-prem.

Related

Can I upload the file to the blob storage and give that path to the docusign instead of base64 or bytes

I have larger files it is taking too much time when I give base64 or even bytes. I am looking for an option where I can directly give bloburl to docusign envelope. If there is any option please help
Yes, you can upload documents in binary format and from cloud providers.
Cloud providers
DocuSign can load directly from
Google Drive
Dropbox
Box
OneDrive (Personal and Business)
Documentation. To use this feature as a developer, first set it up using the DocuSign web app. Then use DocuSign's API logging to see how the API calls reference the files on the cloud servers.
Also see the docs for the Document.remoteUrl attribute.
Use multi-part mime format with the regular Envelopes:create call
Multi-part mime enables you to include one or more documents in binary format. Docs. Example using Node.js. Examples for other languages are also available as part of the QuickStart code examples.
Use Chunked Uploads
The Chunked Uploads API resource enables you to upload a document in binary format, in multiple parts if needed, then use the resulting reference URL when creating an envelope.
The API Request Builder uses chunked uploads. So you can monitor the API via API logging while using the API Request Builder to see what it is doing.
In any case, remember that there's a maximum request size for any API call to DocuSign of 34MB. There are other limits too. Discuss with your DocuSign contacts if you have any issues with limits.

AWS S3 Bucket Presigned url issue

I have written an API to read user posts after the token is passed in the header. API returns many posts at a time with the nested attachment name for images or videos etc. Currently, all attachments are stored in a server folder directory. Attachments is displayed by another API which accept attachment name as a parameter and return attachment url.
Now I want to move on AWS S3 bucket with the same concept with presigned URL.
API is being used on the flutter app.
I created a API which accept user auth token and return upload presigned URL for s3 bucket.
For displaying attachments i am thinking two option.
Create a another API which accept attachment name(object key name) and will return presigned URL of that attachment.
Post API return json data after replacing all attachment name with presigned URL. But this will take too long for nested json data by looping.
I am new in AWS s3 bucket. Please guide what will be the best way to handle this.
How facebook, twitter, instagram handle private files.
The best option I see is returning the post data with already generated pre-signed url.
Having a separate api for generating the presigned url would mean
the system will need to authorize the input anyway (if the user is authorized to access the particular object)
the user has to wait anyway until the signed links are generared, just with additional call
this will take too long for nested json data by looping
Not really, generating the presigned url makes no backend / S3 calls, it's just a bunch of HMAC computations. But, as already mentioned, these need to be done regardless which option is chosen

Azure Logic app - Send the whole email to a rest call as a .eml attachment

I am trying to create a logic app with email received trigger.
When email has multiple attachments, I am able to loop and make a http call per attachment
However we have to send the whole email as http call by creating .eml file of the email with attachments.
Pls advise
While the built-in actions do not seem to support this out of the box, you can make a Microsoft Graph API call to get the MIME content of a message.
There is no official connector for all available Microsoft Graph APIs, so you would need to use the HTTP with Azure AD Connector instead.
The response body content could then be written to a file in blob storage using the Create Blob Action.

Linking DocuSign Pages to clients in bulk

We have clients who sign signature pages for tax returns and other files alike. We will have thousands of these pages in a pdf or in a zip file. We are trying to upload these files to our AWS S3 bucket and want to know which user matches which document link. From here, we will connect the completed signature pages onto their account on our website. We want to know the optimal way of being able to solve this problem since it is in bulk and doing it by automation is way better. I am wondering if the docusign API already has some function(s) to help us with this.
So far, I've already played with the rest API quick startcode examples, and the PHP Auth Grant.
Yes, you can do all of that with the API, but you have some decisions to make:
do you want the documents to be store in DocuSign or AWS?
How do you control access/permissions to the documents?
If you store them in DocuSign - that implies that only those with access to the DocuSign account (have user/password for DocuSign) can view the even if linked from an AWS site.

NodeJS - Protect image url to only authorized user

So I'm currently building an app. User would have the possibility to upload image. The image they upload should only be visible by them. So I'm wondering how I can achieve this considering the image is available through a URL.
Actually what I was thinking was, in order to get the picture, the user should do a REST API request and the api would return the image data if the user has the correct permission.
The frontend of my app is in React and the backend (Rest api) in nodeJS.
Edit: Actually the image are store on AWS S3 (this can change if needed)
Thanks !
The best option to allow only authorized users to fetch an image is S3 Presigned URL You can refer to the article, it thoroughly describes how to implement S3 Presigned URL. Another code example with Node JS. If you code in another language just google it "AWS S3 Presigned URL" and you will find it.

Resources