Sha256: 37b97d54d22558bb60a80cedea7fda86b0cbfd5ccc2dcf19568e0cae7ca6f7a1
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 KB
Contents
<?php require_once __DIR__ . "/vendor/autoload.php"; $config = HelloSignSDK\Configuration::getDefaultConfiguration(); // Configure HTTP basic authorization: api_key $config->setUsername("YOUR_API_KEY"); // or, configure Bearer (JWT) authorization: oauth2 // $config->setAccessToken("YOUR_ACCESS_TOKEN"); $api = new HelloSignSDK\Api\ApiAppApi($config); $oauth = new HelloSignSDK\Model\SubOAuth(); $oauth->setCallbackUrl("https://example.com/oauth") ->setScopes([ HelloSignSDK\Model\SubOAuth::SCOPES_BASIC_ACCOUNT_INFO, HelloSignSDK\Model\SubOAuth::SCOPES_REQUEST_SIGNATURE, ]); $whiteLabelingOptions = new HelloSignSDK\Model\SubWhiteLabelingOptions(); $whiteLabelingOptions->setPrimaryButtonColor("#00b3e6") ->setPrimaryButtonTextColor("#ffffff"); $customLogoFile = new SplFileObject(__DIR__ . "/CustomLogoFile.png"); $data = new HelloSignSDK\Model\ApiAppCreateRequest(); $data->setName("My Production App") ->setDomains(["example.com"]) ->setOauth($oauth) ->setWhiteLabelingOptions($whiteLabelingOptions) ->setCustomLogoFile($customLogoFile); try { $result = $api->apiAppCreate($data); print_r($result); } catch (HelloSignSDK\ApiException $e) { $error = $e->getResponseObject(); echo "Exception when calling HelloSign API: " . print_r($error->getError()); }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hellosign-ruby-sdk-6.0.0.pre.beta | oas/examples/ApiAppCreate.php |