A classic way to initialize an SDK entry point object is to call HtmlApi() constructor with user Credentials
parameters.
The HtmlApi (clientId
, clientSecret
) method initializes a class instance with user Credentials and default API server URL. We need to pass into the HtmlApi() constructor two required parameters: Client Id and Client Secret.
var clientId = "aaaaaaaa-cccc-dddd-9999-1112222333dd";
var clientSecret = "60487a72d6325241191177e37ae5214";
var api = new HtmlApi(clientId, clientSecret);
Configuration.setBasePath("https://api.aspose.cloud");
Configuration.setAuthPath("https://api.aspose.cloud/connect/token");
Configuration.setUserAgent("WebKit");
Configuration.setDebug(true);
HtmlApi api = new HtmlApi("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
#include "AsposeHtmlCloud.h"
const utility::string_t clientId = L"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
const utility::string_t clientSecret = L"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const utility::string_t basePath = L"https://api.aspose.cloud/v4.0";
const utility::string_t authPath = L"https://api.aspose.cloud/connect/token";
// Create configuration for authorization
std::shared_ptr<ApiConfiguration> apiConfig(new ApiConfiguration(clientId, clientSecret, basePath, authPath));
// Create client from configuration
std::shared_ptr<ApiClient> apiClient(new ApiClient(apiConfig));
// Create ConversionApi
std::shared_ptr<ConversionApi> api = std::make_shared<ConversionApi>(apiClient);
from asposehtmlcloud.configuration import Configuration
from asposehtmlcloud.api.html_api import HtmlApi
from asposehtmlcloud.api_client import ApiClient as Client
# Get keys from aspose site.
# There is free quota available.
# For more details, see https://purchase.aspose.cloud/pricing
configuration = Configuration(apiKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
appSid="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
basePath="https://api.aspose.cloud/v4.0",
authPath="https://api.aspose.cloud/connect/token",
debug=True)
client = Client(configuration)
html_api = HtmlApi(client)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$conf = array(
"basePath" => "https://api.aspose.cloud/v4.0",
"authPath" => "https://api.aspose.cloud/connect/token",
"apiKey" => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"appSID" => "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"defaultUserAgent" => "Webkit"
);
$api_html = new Client\Invoker\Api\HtmlApi($conf);
# load the gem
require 'aspose_html_cloud'
# Get keys from aspose site.
# There is free quota available.
# For more details, see https://purchase.aspose.cloud/pricing
CONFIG = {
"basePath":"https://api.aspose.cloud/v4.0",
"authPath":"https://api.aspose.cloud/connect/token",
"apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"debug":true
}
api_instance = AsposeHtml::HtmlApi.new CONFIG
var conf = {
"basePath":"https://api.aspose.cloud/v4.0",
"authPath":"https://api.aspose.cloud/connect/token",
"apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"defaultUserAgent":"NodeJsWebkit"
};
var api = require('@asposecloud/aspose-html-cloud');
// Create Conversion Api object
var conversionApi = new api.ConversionApi(conf);
import AsposeHtmlCloud
ClientAPI.setConfig(
basePath: "https://api.aspose.cloud/v4.0",
authPath: "https://api.aspose.cloud/connect/token",
apiKey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
appSID: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
debugging: true)
Configuration.setBasePath("https://api.aspose.cloud");
Configuration.setAuthPath("https://api.aspose.cloud/connect/token");
Configuration.setUserAgent("WebKit");
Configuration.setDebug(true);
HtmlApi api = new HtmlApi("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");