-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFreeFormInviteExample.java
More file actions
31 lines (26 loc) · 1.31 KB
/
FreeFormInviteExample.java
File metadata and controls
31 lines (26 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import com.signnow.api.documentinvite.request.FreeFormInvitePostRequest;
import com.signnow.api.documentinvite.response.FreeFormInvitePostResponse;
import com.signnow.core.ApiClient;
import com.signnow.core.exception.SignNowApiException;
import com.signnow.core.factory.SdkFactory;
public class FreeFormInviteExample {
public static void main(String[] args) {
// Set your actual input data here
// Note: following values are dummy, just for example
//----------------------------------------------------
// if it is not specified here, a new Bearer token will be created automatically
String bearerToken = "";
String senderEmail = "sender@signnow.com";
String signerEmail = "signer@signnow.com";
String documentId = "b2072009b7e0427dba1f6de56df4812da5d8eb9c"; // Document to be signed
try {
ApiClient client = SdkFactory.createApiClientWithBearerToken(bearerToken);
FreeFormInvitePostRequest request = new FreeFormInvitePostRequest(signerEmail, senderEmail);
request.withDocumentId(documentId);
FreeFormInvitePostResponse response = (FreeFormInvitePostResponse) client.send(request).getResponse();
System.out.println("Invite Request ID: " + response.getId());
} catch (SignNowApiException e) {
System.out.println("ERROR: " + e.getMessage());
}
}
}