-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Uncaught InvalidArgumentException #20
Comments
Which quickstart is this from? |
Hello! So you will need to set the redirect URI in your $client = new Google_Client();
$client->setRedirectUri('https://mywebsite.com/auth/callback');
$client->setAuthConfig('/path/to/service_account.json');
$url = $client->createAuthUrl(); |
@asrivas PHP Quickstart for the google sheets api v4 |
No worries, glad you figured it out! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Please search existing issues before creating a new one.)
Sample:
Expected Behavior
Actual Behavior
Terminal throws an error:
Fatal error: Uncaught InvalidArgumentException: missing the required redirect URI in /Users/e32398/Sites/composer_test/vendor/google/auth/src/OAuth2.php:650
Stack trace:
#0 /Users/e32398/Sites/composer_test/vendor/google/apiclient/src/Google/Client.php(339): Google\Auth\OAuth2->buildFullAuthorizationUri(Array)
#1 /Users/e32398/Sites/composer_test/quickstart.php(26): Google_Client->createAuthUrl()
#2 /Users/e32398/Sites/composer_test/quickstart.php(58): getClient()
#3 {main}
thrown in /Users/e32398/Sites/composer_test/vendor/google/auth/src/OAuth2.php on line 650
Steps to Reproduce the Problem
Specifications
php -v
): 7.1.7The text was updated successfully, but these errors were encountered: