forked from hellosign/hellosign-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApiAppUpdate.ts
More file actions
33 lines (25 loc) · 906 Bytes
/
ApiAppUpdate.ts
File metadata and controls
33 lines (25 loc) · 906 Bytes
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
import * as HelloSignSDK from "hellosign-sdk";
const fs = require('fs');
const api = new HelloSignSDK.ApiAppApi();
// Configure HTTP basic authorization: api_key
api.username = "YOUR_API_KEY";
// or, configure Bearer (JWT) authorization: oauth2
// api.accessToken = "YOUR_ACCESS_TOKEN";
const whiteLabelingOptions: HelloSignSDK.SubWhiteLabelingOptions = {
primaryButtonColor: "#00b3e6",
primaryButtonTextColor: "#ffffff",
};
const data: HelloSignSDK.ApiAppUpdateRequest = {
name: "New Name",
callbackUrl: "http://example.com/hellosign",
customLogoFile: fs.createReadStream("CustomLogoFile.png"),
whiteLabelingOptions,
};
const clientId = "0dd3b823a682527788c4e40cb7b6f7e9";
const result = api.apiAppUpdate(clientId, data);
result.then(response => {
console.log(response.body);
}).catch(error => {
console.log("Exception when calling HelloSign API:");
console.log(error.body);
});