Skip to content

Latest commit

 

History

History
497 lines (341 loc) · 12.2 KB

ApiAppApi.md

File metadata and controls

497 lines (341 loc) · 12.2 KB

ApiAppApi

All URIs are relative to https://api.hellosign.com/v3.

Method HTTP request Description
apiAppCreate() POST /api_app Create API App
apiAppDelete() DELETE /api_app/{client_id} Delete API App
apiAppGet() GET /api_app/{client_id} Get API App
apiAppList() GET /api_app/list List API Apps
apiAppUpdate() PUT /api_app/{client_id} Update API App

apiAppCreate()

apiAppCreate(apiAppCreateRequest: ApiAppCreateRequest): ApiAppGetResponse

Create API App

Creates a new API App.

TypeScript Example

import * as DropboxSign from "@dropbox/sign";
import * as fs from 'fs';

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const oauth: DropboxSign.SubOAuth = {
  callbackUrl: "https://example.com/oauth",
  scopes: [
    DropboxSign.SubOAuth.ScopesEnum.BasicAccountInfo,
    DropboxSign.SubOAuth.ScopesEnum.RequestSignature,
  ],
};

const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = {
  primaryButtonColor: "#00b3e6",
  primaryButtonTextColor: "#ffffff",
};

const data: DropboxSign.ApiAppCreateRequest = {
  name: "My Production App",
  domains: ["example.com"],
  customLogoFile: fs.createReadStream("CustomLogoFile.png"),
  oauth,
  whiteLabelingOptions,
};

const result = apiAppApi.apiAppCreate(data);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

JavaScript Example

import * as DropboxSign from "@dropbox/sign";
import * as fs from 'fs';

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const oauth = {
  callbackUrl: "https://example.com/oauth",
  scopes: [
    "basic_account_info",
    "request_signature",
  ],
};

const whiteLabelingOptions = {
  primaryButtonColor: "#00b3e6",
  primaryButtonTextColor: "#ffffff",
};

const data = {
  name: "My Production App",
  domains: ["example.com"],
  customLogoFile: fs.createReadStream("CustomLogoFile.png"),
  oauth,
  whiteLabelingOptions,
};

const result = apiAppApi.apiAppCreate(data);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

Parameters

Name Type Description Notes
apiAppCreateRequest ApiAppCreateRequest

Return type

ApiAppGetResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiAppDelete()

apiAppDelete(clientId: string)

Delete API App

Deletes an API App. Can only be invoked for apps you own.

TypeScript Example

import * as DropboxSign from "@dropbox/sign";

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const clientId = "0dd3b823a682527788c4e40cb7b6f7e9";

const result = apiAppApi.apiAppDelete(clientId);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

JavaScript Example

import * as DropboxSign from "@dropbox/sign";

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const clientId = "0dd3b823a682527788c4e40cb7b6f7e9";

const result = apiAppApi.apiAppDelete(clientId);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

Parameters

Name Type Description Notes
clientId string The client id of the API App to delete.

Return type

void (empty response body)

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiAppGet()

apiAppGet(clientId: string): ApiAppGetResponse

Get API App

Returns an object with information about an API App.

TypeScript Example

import * as DropboxSign from "@dropbox/sign";

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const clientId = "0dd3b823a682527788c4e40cb7b6f7e9";

const result = apiAppApi.apiAppGet(clientId);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

JavaScript Example

import * as DropboxSign from "@dropbox/sign";

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const clientId = "0dd3b823a682527788c4e40cb7b6f7e9";

const result = apiAppApi.apiAppGet(clientId);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

Parameters

Name Type Description Notes
clientId string The client id of the API App to retrieve.

Return type

ApiAppGetResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiAppList()

apiAppList(page: number, pageSize: number): ApiAppListResponse

List API Apps

Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates.

TypeScript Example

import * as DropboxSign from "@dropbox/sign";

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const page = 1;
const pageSize = 2;

const result = apiAppApi.apiAppList(page, pageSize);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

JavaScript Example

import * as DropboxSign from "@dropbox/sign";

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const page = 1;
const pageSize = 2;

const result = apiAppApi.apiAppList(page, pageSize);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

Parameters

Name Type Description Notes
page number Which page number of the API App List to return. Defaults to 1. [optional] [default to 1]
pageSize number Number of objects to be returned per page. Must be between 1 and 100. Default is 20. [optional] [default to 20]

Return type

ApiAppListResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

apiAppUpdate()

apiAppUpdate(clientId: string, apiAppUpdateRequest: ApiAppUpdateRequest): ApiAppGetResponse

Update API App

Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string.

TypeScript Example

import * as DropboxSign from "@dropbox/sign";
import * as fs from 'fs';

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const whiteLabelingOptions: DropboxSign.SubWhiteLabelingOptions = {
  primaryButtonColor: "#00b3e6",
  primaryButtonTextColor: "#ffffff",
};

const data: DropboxSign.ApiAppUpdateRequest = {
  name: "New Name",
  callbackUrl: "http://example.com/dropboxsign",
  customLogoFile: fs.createReadStream("CustomLogoFile.png"),
  whiteLabelingOptions,
};

const clientId = "0dd3b823a682527788c4e40cb7b6f7e9";

const result = apiAppApi.apiAppUpdate(clientId, data);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

JavaScript Example

import * as DropboxSign from "@dropbox/sign";
import * as fs from 'fs';

const apiAppApi = new DropboxSign.ApiAppApi();

// Configure HTTP basic authorization: api_key
apiAppApi.username = "YOUR_API_KEY";

// or, configure Bearer (JWT) authorization: oauth2
// apiAppApi.accessToken = "YOUR_ACCESS_TOKEN";

const whiteLabelingOptions = {
  primaryButtonColor: "#00b3e6",
  primaryButtonTextColor: "#ffffff",
};

const data = {
  name: "New Name",
  callbackUrl: "http://example.com/dropboxsign",
  customLogoFile: fs.createReadStream("CustomLogoFile.png"),
  whiteLabelingOptions,
};

const clientId = "0dd3b823a682527788c4e40cb7b6f7e9";

const result = apiAppApi.apiAppUpdate(clientId, data);
result.then(response => {
  console.log(response.body);
}).catch(error => {
  console.log("Exception when calling Dropbox Sign API:");
  console.log(error.body);
});

Parameters

Name Type Description Notes
clientId string The client id of the API App to update.
apiAppUpdateRequest ApiAppUpdateRequest

Return type

ApiAppGetResponse

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/json, multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]