Skip to content
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

"Invalid token format" error returned when using malformed auth code #12

Closed
jabcreations opened this issue Jul 30, 2018 · 1 comment
Closed
Assignees

Comments

@jabcreations
Copy link

jabcreations commented Jul 30, 2018

(Please search existing issues before creating a new one.)

Sample:

Expected Behavior

Not sure.

Actual Behavior

This error_log file was created:

[] PHP Fatal error: Uncaught InvalidArgumentException: Invalid token format in /home/example1/public_html/temp/calendar/vendor/google/apiclient/src/Google/Client.php:433
Stack trace:
#0 /home/example1/public_html/temp/calendar/quickstart.php(39): Google_Client->setAccessToken(Array)
#1 /home/example1/public_html/temp/calendar/quickstart.php(52): getClient()
#2 {main}
thrown in /home/example1/public_html/temp/calendar/vendor/google/apiclient/src/Google/Client.php on line 433
[] PHP Fatal error: Uncaught InvalidArgumentException: Invalid token format in /home/example1/public_html/temp/calendar/vendor/google/apiclient/src/Google/Client.php:433
Stack trace:
#0 /home/example1/public_html/temp/calendar/quickstart.php(39): Google_Client->setAccessToken(Array)
#1 /home/example1/public_html/temp/calendar/quickstart.php(52): getClient()
#2 {main}
thrown in /home/example1/public_html/temp/calendar/vendor/google/apiclient/src/Google/Client.php on line 433

Steps to Reproduce the Problem

  1. Follow this tutorial using PuTTY: https://developers.google.com/calendar/quickstart/php
  2. When you need to copy the URL select it and right click to copy, THAT triggers the error (apparently).

Specifications

  • PHP version (php -v): 7.0.31
  • OS (Mac/Linux/Windows): Linux

Apparently the tutorial did work as the second time I run php quickstart.php PuTTY displays a list of near-future events from Google Calendar.

@erickoledadevrel erickoledadevrel changed the title Miscellaneous errors when copying URL in PuTTY "Invalid token format" error returned when using malformed auth code Jul 30, 2018
@erickoledadevrel
Copy link

The problem seems to be that you inadvertently entered an invalid auth code, but the error wasn't clear about that. I'll have a fix out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants