Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Implement template/update_files/ #44

Open
alexmac05 opened this issue Oct 5, 2017 · 2 comments
Open

Implement template/update_files/ #44

alexmac05 opened this issue Oct 5, 2017 · 2 comments
Labels
enhancement legacy Related to legacy, non-OpenAPI SDK

Comments

@alexmac05
Copy link
Contributor

alexmac05 commented Oct 5, 2017

Please implement the POST https://[api key]:@api.hellosign.com/v3/template/update_files/[:template_id]

@alexmac05
Copy link
Contributor Author

POST https://[api key]:@api.hellosign.com/v3/template/update_files/[:template_id]

Internal reference number 368984
Requested by customer on 2-18-19

@alexmac05
Copy link
Contributor Author

alexmac05 commented Feb 19, 2019

workaround using the restsharp request library

try
{
var hslogin = "HelloSign account here";
var hspassword = "password";
var apiKey = "API KEY HERE";

var restClient = new RestClient();

string buildTheRequest = "https://" + apiKey + ":@api.hellosign.com";
Console.WriteLine(buildTheRequest);

restClient.BaseUrl = new Uri(buildTheRequest);
restClient.Authenticator = new HttpBasicAuthenticator(hslogin, hspassword);

var request = new RestRequest();
request.Resource = "v3//template/update_files/TEMPLATE ID HERE";

request.Method = Method.POST;
//request.AddFile("nda.pdf", @"C:\Users\Me\My Documents\NDA.pdf");
request.AddFile("nda.pdf", @"/Users/example/nda.pdf");
request.AddParameter("test_mode", 1);

IRestResponse response = restClient.Execute(request);

Console.WriteLine(response.Content);

if (response.ErrorException != null)
{
const string message = "Error retrieving response. Check inner details for more info.";
var helloSignException = new ApplicationException(message, response.ErrorException);
throw helloSignException;
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message, ex.InnerException.Message);
}

}

@jtreminio-dropbox jtreminio-dropbox added the legacy Related to legacy, non-OpenAPI SDK label Jun 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement legacy Related to legacy, non-OpenAPI SDK
Projects
None yet
Development

No branches or pull requests

3 participants