Skip to content

Latest commit

 

History

History
261 lines (171 loc) · 7.11 KB

AccountApi.md

File metadata and controls

261 lines (171 loc) · 7.11 KB

Dropbox\Sign\AccountApi

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

Method HTTP request Description
accountCreate() POST /account/create Create Account
accountGet() GET /account Get Account
accountUpdate() PUT /account Update Account
accountVerify() POST /account/verify Verify Account

accountCreate()

accountCreate($account_create_request): \Dropbox\Sign\Model\AccountCreateResponse

Create Account

Creates a new Dropbox Sign Account that is associated with the specified email_address.

Example

<?php

require_once __DIR__ . "/vendor/autoload.php";

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();

// Configure HTTP basic authorization: api_key
$config->setUsername("YOUR_API_KEY");

// or, configure Bearer (JWT) authorization: oauth2
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$accountApi = new Dropbox\Sign\Api\AccountApi($config);

$data = new Dropbox\Sign\Model\AccountCreateRequest();
$data->setEmailAddress("[email protected]");

try {
    $result = $accountApi->accountCreate($data);
    print_r($result);
} catch (Dropbox\Sign\ApiException $e) {
    $error = $e->getResponseObject();
    echo "Exception when calling Dropbox Sign API: "
        . print_r($error->getError());
}

Parameters

Name Type Description Notes
account_create_request \Dropbox\Sign\Model\AccountCreateRequest

Return type

\Dropbox\Sign\Model\AccountCreateResponse

Authorization

api_key, oauth2

HTTP request headers

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

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

accountGet()

accountGet($account_id, $email_address): \Dropbox\Sign\Model\AccountGetResponse

Get Account

Returns the properties and settings of your Account.

Example

<?php

require_once __DIR__ . "/vendor/autoload.php";

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();

// Configure HTTP basic authorization: api_key
$config->setUsername("YOUR_API_KEY");

// or, configure Bearer (JWT) authorization: oauth2
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$accountApi = new Dropbox\Sign\Api\AccountApi($config);

try {
    $result = $accountApi->accountGet(null, '[email protected]');
    print_r($result);
} catch (Dropbox\Sign\ApiException $e) {
    $error = $e->getResponseObject();
    echo "Exception when calling Dropbox Sign API: "
        . print_r($error->getError());
}

Parameters

Name Type Description Notes
account_id string account_id or email_address is required. If both are provided, the account id prevails. The ID of the Account. [optional]
email_address string account_id or email_address is required, If both are provided, the account id prevails. The email address of the Account. [optional]

Return type

\Dropbox\Sign\Model\AccountGetResponse

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]

accountUpdate()

accountUpdate($account_update_request): \Dropbox\Sign\Model\AccountGetResponse

Update Account

Updates the properties and settings of your Account. Currently only allows for updates to the Callback URL and locale.

Example

<?php

require_once __DIR__ . "/vendor/autoload.php";

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();

// Configure HTTP basic authorization: api_key
$config->setUsername("YOUR_API_KEY");

// or, configure Bearer (JWT) authorization: oauth2
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$accountApi = new Dropbox\Sign\Api\AccountApi($config);

$data = new Dropbox\Sign\Model\AccountUpdateRequest();
$data->setCallbackUrl("https://www.example.com/callback");

try {
    $result = $accountApi->accountUpdate($data);
    print_r($result);
} catch (Dropbox\Sign\ApiException $e) {
    $error = $e->getResponseObject();
    echo "Exception when calling Dropbox Sign API: "
        . print_r($error->getError());
}

Parameters

Name Type Description Notes
account_update_request \Dropbox\Sign\Model\AccountUpdateRequest

Return type

\Dropbox\Sign\Model\AccountGetResponse

Authorization

api_key, oauth2

HTTP request headers

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

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

accountVerify()

accountVerify($account_verify_request): \Dropbox\Sign\Model\AccountVerifyResponse

Verify Account

Verifies whether an Dropbox Sign Account exists for the given email address.

Example

<?php

require_once __DIR__ . "/vendor/autoload.php";

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();

// Configure HTTP basic authorization: api_key
$config->setUsername("YOUR_API_KEY");

// or, configure Bearer (JWT) authorization: oauth2
// $config->setAccessToken("YOUR_ACCESS_TOKEN");

$accountApi = new Dropbox\Sign\Api\AccountApi($config);

$data = new Dropbox\Sign\Model\AccountVerifyRequest();
$data->setEmailAddress("[email protected]");

try {
    $result = $accountApi->accountVerify($data);
    print_r($result);
} catch (Dropbox\Sign\ApiException $e) {
    $error = $e->getResponseObject();
    echo "Exception when calling Dropbox Sign API: "
        . print_r($error->getError());
}

Parameters

Name Type Description Notes
account_verify_request \Dropbox\Sign\Model\AccountVerifyRequest

Return type

\Dropbox\Sign\Model\AccountVerifyResponse

Authorization

api_key, oauth2

HTTP request headers

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

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