src/Client.php
public static function verifyAccessToken($accessToken=null)
    {
        // Check access_token
        if (null === $accessToken) {
            $token = self::getClient()->getAccessToken();
            if (!isset($token['access_token'])) {
                throw new Exception(
                    'access_token must be passed in or set as part of setAccessToken'
                );
            }
            $accessToken = $token['access_token'];
        }

        // Google API request
        $response = (new \GuzzleHttp\Client())
            ->request('GET', self::TOKENINFO_URI, [
                'query' => [
                    'access_token' => $accessToken,
                ],
                'http_errors' => false,
            ]);
        // var_dump($response);exit;

        // Result check
        if (200 != $response->getStatusCode()) {
            return false;
        }
        
        return json_decode($response->getBody(), true);
    }
public static function verifyAccessToken($accessToken=null)
    {
        // Check access_token
        if (null === $accessToken) {
            $token = self::getClient()->getAccessToken();
            if (!isset($token['access_token'])) {
                throw new Exception(
                    'access_token must be passed in or set as part of setAccessToken'
                );
            }
            $accessToken = $token['access_token'];
        }

        // Google API request
        $response = (new \GuzzleHttp\Client())
            ->request('GET', self::TOKENINFO_URI, [
                'query' => [
                    'access_token' => $accessToken,
                ],
                'http_errors' => false,
            ]);
        // var_dump($response);exit;

        // Result check
        if (200 != $response->getStatusCode()) {
            return false;
        }
        
        return json_decode($response->getBody(), true);
    }
public static function verifyAccessToken ( $ accessToken = null ) { // Check access_token
 if ( null === $ accessToken ) { $ token = self :: getClient ( ) -> getAccessToken ( ) ; if ( ! isset ( $ token [ 'access_token' ] ) ) { throw new Exception ( 'access_token must be passed in or set as part of setAccessToken' ) ; } $ accessToken = $ token [ 'access_token' ] ; } // Google API request
 $ response = ( new \ GuzzleHttp \ Client ( ) ) -> request ( 'GET' , self :: TOKENINFO_URI , [ 'query' => [ 'access_token' => $ accessToken , ] , 'http_errors' => false , ] ) ; // var_dump($response);exit;
 // Result check
 if ( 200 != $ response -> getStatusCode ( ) ) { return false ; } return json_decode ( $ response -> getBody ( ) , true ) ; }
Verify an access_token. This method will verify the current access_token by Google API,
if one isn't provided.

The Google verification only allow the access_token within the expired time limit, be sure to
refresh the newest access_token for verifying.

@param string|null $accessToken The token (access_token) that should be verified.
@return array|false Returns the token payload as an array if the verification was
successful, false otherwise.
Verify an access_token . This method will verify the current access_token by Google API if one isn t provided .