PHP code example of stan-business / stan-php
1. Go to this page and download the library: Download stan-business/stan-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stan-business / stan-php example snippets
onfigure HTTP basic authorization: stan_basic_auth
$config = Stan\Configuration::getDefaultConfiguration()
->setClientId('YOUR_API_CLIENT_ID')
->setClientSecret('YOUR_API_CLIENT_SECRET');
$stan_client = new Stan\Api\StanClient($config);
$connect_access_token_request_body = new \Stan\Model\ConnectAccessTokenRequestBody(); // \Stan\Model\ConnectAccessTokenRequestBody
try {
$result = $stan_client->connectApi->createConnectAccessToken($connect_access_token_request_body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ConnectApi->createConnectAccessToken: ', $e->getMessage(), PHP_EOL;
}