oauth-4-laravel icon indicating copy to clipboard operation
oauth-4-laravel copied to clipboard

Working with the Access Token

Open kmmathis opened this issue 10 years ago • 3 comments

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

kmmathis avatar May 13 '14 21:05 kmmathis

Try this dd($token->getAccessToken());

sadekd avatar Jun 05 '14 01:06 sadekd

Thanks This worked for me.

pardeep3055 avatar Jul 26 '16 04:07 pardeep3055

$accessToken->getValue(); $accessToken->getExpiresAt();

MxFlorin avatar Jan 31 '19 09:01 MxFlorin