Trying to Authorize Plugin, but it won't Authorize

QUESTIONS & ANSWERSCategory: WordPressTrying to Authorize Plugin, but it won't Authorize
Profile photo of Ken MatthewsKen Matthews asked 1 month ago

I click get Access Code, get it from google, click save access code.  It then takes me back to the Plugin Auth page, and it says something went wrong.  I click the Errors and Debug and it says this below:

Last Error detected

Last Error: 2017-05-16 12:05:52: exception 'Google_Auth_Exception' with message 'Error fetching OAuth2 access token, message: 'invalid_grant: Invalid code.'' in /home/kbmatth/public_html/laartists.com/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Auth/OAuth2.php:126
Stack trace:
#0 /home/kbmatth/public_html/laartists.com/wp-content/plugins/google-analytics-dashboard-for-wp/tools/src/Google/Client.php(133): Google_Auth_OAuth2->authenticate('4/zOx22qRpMxomZ...')
#1 /home/kbmatth/public_html/laartists.com/wp-content/plugins/google-analytics-dashboard-for-wp/admin/settings.php(732): Google_Client->authenticate('4/zOx22qRpMxomZ...')
#2 [internal function]: GADWP_Settings::general_settings('')
#3 /home/kbmatth/public_html/laartists.com/wp-includes/class-wp-hook.php(298): call_user_func_array(Array, Array)
#4 /home/kbmatth/public_html/laartists.com/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
#5 /home/kbmatth/public_html/laartists.com/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#6 /home/kbmatth/public_html/laartists.com/wp-admin/admin.php(222): do_action('toplevel_page_g...')
#7 {main}
ResponseHttpCode:400

Not sure why google would give me a code that doesn't work with your plugin
1 Answers
Profile photo of Alin MarcuAlin Marcu Staff answered 1 month ago

Hi,

Try to authorize using a diffrent browser. Also make sure the entire code is copied while authorizing.

I assume you’ve followed the documentation page and already created a Google Analytics account and a Property.