Cannot get "Auth Code" for Google Analytics Connection

#1

The “click here” URL is broken within the Metabase console to add Google Analytics:

Where do I get the Auth Code? In the OAuth Google API panel, there is no where to generate an auth code, only the client ID and client secret.

#2

I get a 400 error

I had to make a second posting, since as a new user I cannot post more than one picture in a post.

#3

I just tried to create a new token, and the link worked for me as expected.

Can you share what OS you’re on, what version of Metabase you’re using and whether it’s a personal account or G-Suite account you’re using to log into your google analytics?

#4

Installation is on AWS elastic beanstalk and Google account is on a business/Google for Work paid account.

#5

Which browser, os, and metabase versions, etc? We’ll try to replicate the problem. On the couple machines I’ve tried this on, I end up on the right page, so something different is happening with you.

#6

I figured out the issue. When creating the API client ID and secret I selected “web application” instead of “other” in the OAuth section.

1 Like
#7

I had the same issue. Turned out the Client ID and Client Secret field contained a space before en after the values. Apparently using the copy option from Google Developers Console adds a space before and after the copied values…

The Auth Code link in Metabase is created based upon the values in Client ID and Client Secret, so when they contain spaces, the link obviously doesn’t work.

Maybe Metabase could check for spaces?

#8

Hey I have the same issue. I get a 400 page when I click on the image. Have you been able to solve the issue?

I am using a local setup on Mac

#9

Hi @manghat
What’s the error text on 400 ?
Make sure there are no spaces before or after the auth code.
There’s an issue open about make this process a bit more friendly:
https://github.com/metabase/metabase/issues/9836