1. Go to this page and download the library: Download creatissimo/dhl-oauth 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/ */
creatissimo / dhl-oauth example snippets
apiInstance = new DHLOauth\Client\Api\AuthenticationApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$grant_type = 'grant_type_example'; // string
$username = 'username_example'; // string | GKP user name. Required for grant_type=password.
$password = 'password_example'; // string | GKP password. Required for grant_type=password.
$client_id = 'client_id_example'; // string
$client_secret = 'client_secret_example'; // string
try {
$result = $apiInstance->dispenseToken($grant_type, $username, $password, $client_id, $client_secret);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationApi->dispenseToken: ', $e->getMessage(), PHP_EOL;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.