PHP code example of compwright / oauth2-domo
1. Go to this page and download the library: Download compwright/oauth2-domo 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/ */
compwright / oauth2-domo example snippets
$domoProviderFactory = new DomoProviderFactory();
$provider = $domoProviderFactory->new(
clientId: 'your_client_id',
clientSecret: 'your_client_secret',
);
$token = $provider->getAccessToken('client_credentials', [
'scope' => ['data', 'user'],
]);
echo $token->getToken() . PHP_EOL;
//