Skip to main content
Participant
June 19, 2020
Question

Unable to download signed document API

  • June 19, 2020
  • 1 reply
  • 892 views

I'm using the C# SDK. I've successfully managed to upload a transient document, create and send an agreement and check the agreement status but can't download a document once it's been signed.

 

I have managed to do this using both Postman and "Try It Out" in the documentation. Does anyone have a simple working example of this that I could learn from?

 

I'm trying to use the Combined Document GET method to retrieve the document.

This topic has been closed for replies.

1 reply

Participant
June 20, 2020

I am unable to open and down load my documents it says it is password protected but I dont remember installing one how do I go about resetting the password so I can veiw and download them

FraserM4Author
Participant
June 22, 2020

I resolved my original issue above by adding an additional header, "Accept" below. I then encountered the same issue as you and resolved by changing to use the DownloadData method of the RestSharp client. You need to add a using statement for RestSharp.Extensions to be able to use the SaveAs method below.

 

Here's my working example.

 

string your_access_token;

string your_agreement_id;

var client = new RestClient("https://api.eu1.echosign.com/api/rest/v6/agreements/" + your_agreement_id + "/combinedDocument");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer " + your_access_token);
request.AddHeader("Accept", "*/*");
client.DownloadData(request).SaveAs(@"C:\Temp\" + your_agreement_id + ".pdf");

 

I hope this helps you.