forked from hellosign/hellosign-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApiAppDelete.java
40 lines (33 loc) · 1.4 KB
/
ApiAppDelete.java
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
32
33
34
35
36
37
38
39
40
import com.hellosign.openapi.ApiClient;
import com.hellosign.openapi.ApiException;
import com.hellosign.openapi.Configuration;
import com.hellosign.openapi.api.*;
import com.hellosign.openapi.auth.HttpBasicAuth;
import com.hellosign.openapi.auth.HttpBearerAuth;
import com.hellosign.openapi.model.*;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: api_key
HttpBasicAuth api_key = (HttpBasicAuth) defaultClient
.getAuthentication("api_key");
api_key.setUsername("YOUR_API_KEY");
// or, configure Bearer (JWT) authorization: oauth2
/*
HttpBearerAuth oauth2 = (HttpBearerAuth) defaultClient
.getAuthentication("oauth2");
oauth2.setBearerToken("YOUR_ACCESS_TOKEN");
*/
ApiAppApi api = new ApiAppApi(defaultClient);
String clientId = "0dd3b823a682527788c4e40cb7b6f7e9";
try {
api.apiAppDelete(clientId);
} catch (ApiException e) {
System.err.println("Exception when calling AccountApi#accountCreate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}