PHP code example of rapidwebltd / php-google-oauth-2-handler
1. Go to this page and download the library: Download rapidwebltd/php-google-oauth-2-handler 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/ */
rapidwebltd / php-google-oauth-2-handler example snippets
use RapidWeb\GoogleOAuth2Handler\GoogleOAuth2Handler;
$handler = new GoogleOAuth2Handler(
$clientId,
$clientSecret,
$scopes,
$refreshToken,
$redirectUri
);
$response = $handler->performRequest('GET', 'https://people.googleapis.com/v1/people/me');
composer bash
php vendor/rapidwebltd/php-google-oauth-2-handler/src/setup.php