PHP code example of zingtree / oauth2-talkdesk

1. Go to this page and download the library: Download zingtree/oauth2-talkdesk 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/ */

    

zingtree / oauth2-talkdesk example snippets


$provider = new Zingtree\OAuth2\Client\Provider\Talkdesk([
    'clientId'          => '{talkdesk-client-id}',
    'clientSecret'      => '{talkdesk-client-secret}',
    'redirectUri'       => 'https://example.com/callback-url',
    'subdomain'         => 'your-talkdesk-subdomain',
]);

$currentSubdomain = $provider->getSubdomain();
$newSubdomain = $currentSubdomain . '-v2';
$provider->setSubdomain($newSubdomain);