When Authorizing account, I've got error:
Invalid Google Analytics OAuth request

Can somebody tell me where si the problem?
Used modules: GA, GA API, GA Counter, GA Reports, Autoload, OAuth
Thanks!

Comments

raspberryman’s picture

Assigned:Unassigned» raspberryman
Status:Active» Closed (cannot reproduce)

Sounds like you've got all the required dependencies.

Alas, I cannot reproduce this issue. Any chance you can find steps to reproduce?

Earlier today, I was working on the OAuth code and went through a least 2 dozen successful authorizations. So the trouble you are facing might be unique enough that I will need your help to narrow down the cause. Please help me :)

yaho’s picture

Hi,

after this problem I stoped working on it for a few days. And now voilá, it works :-)
Maybe problem somewhere in Google :-)

Thanks!

deanflory’s picture

Component:Code» Reports module

I'm getting this error as well.

Landing page "Google Analytics Reports OAuth Callback" after submission and authorizing via Google page:
=/google-analytics-reports/oauth?oauth_verifier=*

Original admin page:
/admin/config/system/google-analytics-reports

Oh, you know what, when attempting this again, Google states "The application that directed you here claims to be "Google Analytics Reports Drupal module". We are unable to verify this claim as the application runs on your computer, as opposed to a website. We recommend you deny access unless you trust the application."

I believe this may be not because I'm running it off a local 'puter, as I'm not, but probably because my site is in maintenance mode, thus denying access to Google to verify something. I'll try again later after I've taken it out of Maintenance Mode.

deanflory’s picture

Also, when clicking "Grant access" on Google and being redirected back to the admin page, I did not receive the error the second time, but don't know yet if it actually is working or not.

shuklasp’s picture

Version:6.x-1.0» 7.x-1.3

Same issue here on the 7.x

shuklasp’s picture

Status:Closed (cannot reproduce)» Active
RafeHatfield’s picture

I know this is closed, but regardless - I was seeing very similar behaviour until it occurred to me that I had registered my domain with Google apps using an email address that didn't have permissions to my Google Analytics reports. Adding the email address to the admin users for my analytics account fixed the issue.

patrickroma’s picture

Same error here => Code: 401 - Error: Unauthorized - Message: GDatarequiredAuthorizationLogin Required

No statistics available at all.

Babalu’s picture

same error here too

mbahlol’s picture

same here with error Code: 401 - Error: Unauthorized - Message: GDatarequiredAuthorizationLogin Required

ascii122’s picture

same here

PacoMuñoz’s picture

I have the same problem Code: 401 - Error: Unauthorized - Message: GDatarequiredAuthorizationLogin Required.

I have my drupal-db in local environment and the same durpal-db in a remote virtual machine. Local drupal can connect with GA when I push "start setup and authorize account " button and read data from my GA account. Local environment use a apache web server.
When I try to do the same in remote machine which uses nginx http server I get this message in log : Code: 401 - Error: Unauthorized - Message: GDatarequiredAuthorizationLogin Required.

summerg’s picture

Issue summary:View changes

Hopefully this helps the next user.

I was having this issue and stepping through your code I noticed it sends a time stamp. Our server time was off by 12 minutes. Once I corrected it everything worked.

Stephen Ollman’s picture

Try and use the full URL path and not just the domain.

Try http://www.example.com

NOT: example.com