400 Errors in /transientDocuments POSTS
Hello All,
I'm working on my first Adobe Sign integration and I'm running into a sumbling block right off the bat.
I'm calling the /transientDocuments API and I keep getting a 400 Error or 415 error.
I'm coding in C# and using a WebClient to try to upload a document (the ultimate goal is to send an agreement to an end user).
Here is a snippet of code that throws a 400 error exception:
using(WebClient wc = new WebClient())
{
wc.Headers[HttpRequestHeader.Authorization] = string.Format("{0} {1}", accessToken.token_type, accessToken.access_token);
wc.Headers.Add("Content-Disposition", "form-data; name=\";File\";filename=\"" + model.EvalData.FileName + "\")");
wc.Headers.Add("Mime-Type", "application/pdf");
byte[] bResults = wc.UploadFile(endPoint, tempFileName);
}
I get this response:
Metadata
x-request-id : 53e8adb9-705f-441c-b2f5-8b6d0f651dd0
content-type : application/json
status : 400
Body
{
"code": "NO_FILE_CONTENT",
"message": "Must provide file body"
}
I've tried other variations of this code but keep getting the 400 or 415 errors.
Can someone please point out what I'm doing wrong here?
Thanks in advance,
-tomas
