Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
raspberryman CreditAttribution: raspberryman commentedSounds 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 :)
Comment #2
yaho CreditAttribution: yaho commentedHi,
after this problem I stoped working on it for a few days. And now voilá, it works :-)
Maybe problem somewhere in Google :-)
Thanks!
Comment #3
deanflory CreditAttribution: deanflory commentedI'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.
Comment #4
deanflory CreditAttribution: deanflory commentedAlso, 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.
Comment #5
shuklasp CreditAttribution: shuklasp commentedSame issue here on the 7.x
Comment #6
shuklasp CreditAttribution: shuklasp commentedComment #7
RafeHatfield CreditAttribution: RafeHatfield commentedI 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.
Comment #8
patrickroma CreditAttribution: patrickroma commentedSame error here => Code: 401 - Error: Unauthorized - Message: GDatarequiredAuthorizationLogin Required
No statistics available at all.
Comment #9
Babalu CreditAttribution: Babalu commentedsame error here too
Comment #10
mbahlol CreditAttribution: mbahlol commentedsame here with error Code: 401 - Error: Unauthorized - Message: GDatarequiredAuthorizationLogin Required
Comment #11
ascii122 CreditAttribution: ascii122 commentedsame here
Comment #12
PacoMuñoz CreditAttribution: PacoMuñoz commentedI 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.
Comment #13
summerg CreditAttribution: summerg commentedHopefully 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.
Comment #14
Stephen OllmanTry and use the full URL path and not just the domain.
Try http://www.example.com
NOT: example.com
Comment #15
Plazik CreditAttribution: Plazik as a volunteer commented7.x-1.x version is unsupported. Try the latest 7.x-3.x-beta2 verion.