oauth-4-laravel
oauth-4-laravel copied to clipboard
Working with the Access Token
Is it possible to obtain access to the Access Token? I'm working on a project where I need to pass off the access token to my teammate who is working in Java (I know, it's weird).
$token = $googleService->requestAccessToken( $code );
dd($token->accessToken);
The error I get is:
Symfony \ Component \ Debug \ Exception \ FatalErrorException
Cannot access protected property OAuth\OAuth2\Token\StdOAuth2Token::$accessToken
Try this dd($token->getAccessToken());
Thanks This worked for me.
$accessToken->getValue(); $accessToken->getExpiresAt();