PHP code example of atellitech / gtm-sdk-php

1. Go to this page and download the library: Download atellitech/gtm-sdk-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/ */

    

atellitech / gtm-sdk-php example snippets


=
$clientService = new Client();

$clientService->setClientId('{client-id}']);
$clientService->setClientSecret('{client-secret}']);
$clientService->setDeveloperKey('{developer-token}']);
$clientService->setScopes('{scopes}']);

$clientService->setRefreshToken('{token}');


$client = $clientService->generate();


$accountId = '{account_id}';

$accountData = (new Accounts($client))->get($accountId);