I’m trying to use the .NET SDK to create a signature request for a file. My code is:
public async Task<BoxSignRequest> CreateSignatureRequest(BoxUser user, string signerEmail, string emailMessage, string subject, string sourceFileId, string destinationFolderId)
{
var userClient = GetUserClient(user); //this uses the Client Credentials Grant to get a token for the user that owns the file
BoxSignRequestCreateRequest createRequest = new BoxSignRequestCreateRequest()
{
AreRemindersEnabled = true,
AreTextSignaturesEnabled = false,
DaysValid = 10,
EmailMessage = emailMessage,
EmailSubject = subject,
ParentFolder = new BoxRequestEntity()
{
Id = destinationFolderId
},
Signers = new List<BoxSignRequestSignerCreate>() {
new BoxSignRequestSignerCreate()
{
Email = signerEmail,
LoginRequired = true,
Role = BoxSignRequestSignerRole.signer
}
},
SourceFiles = new List<BoxSignRequestCreateSourceFile>()
{
new BoxSignRequestCreateSourceFile()
{
Id= sourceFileId
}
}
};
var signRequest = await userClient.SignRequestsManager.CreateSignRequestAsync(createRequest);
return signRequest;
}
I’m getting a Bad Request error. The documentation on the .NET SDK is not very comprehensive so I’m wondering if anyone else can help me out here.
Thanks!