google-api-php-client icon indicating copy to clipboard operation
google-api-php-client copied to clipboard

reopened: user to impersonate get authentication errors

Open jqr108 opened this issue 10 years ago • 4 comments

Same issue listed here, still happening: https://github.com/google/google-api-php-client/issues/891

jqr108 avatar Mar 16 '16 17:03 jqr108

Have you tried reauthorizing the user you are impersonating?

bshaffer avatar Mar 17 '16 00:03 bshaffer

@bshaffer How do you go about reauthorizing an impersonated user?

jqr108 avatar Mar 18 '16 00:03 jqr108

@jqr108 I wrote about a few ways you can do this here

bshaffer avatar Mar 18 '16 00:03 bshaffer

@bshaffer Thanks bshaffer, that did it!

Couple notes for anyone else with this issue that follows Option Two above:

$client->fetchAccessTokenFromAuthCode($code); should be $client->fetchAccessTokenWithAuthCode($code);

and if you're using v1 you'll want to use $client->authenticate($code);

jqr108 avatar Mar 29 '16 17:03 jqr108