LCHCAPITALHUMAIN / gapi-google-analytics-php-interface

Automatically exported from code.google.com/p/gapi-google-analytics-php-interface
0 stars 0 forks source link

Error: "usageLimitsuserRateLimitExceededUnregUser Rate Limit Exceeded. #78

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
I expect to receive a json containing traffic data. Instead, the error message 
below appears in my error logs.

What version of the product are you using? On what operating system?
1.3

Please provide any additional information below.
PHP Fatal error:  Uncaught exception 'Exception' with message 'GAPI: Failed to 
request report data. Error: "usageLimitsuserRateLimitExceededUnregUser Rate 
Limit Exceeded. Please sign uphttps://code.google.com/apis/console"' in 
/var/www/clients/client4/web5/web/seoreport/googlesdk/gapi.class.php:218

Original issue reported on code.google.com by le...@corporatepa.net on 8 Aug 2012 at 3:06

GoogleCodeExporter commented 9 years ago
For what it's worth, we changed line 33 of gapi.class.php to the following:

const report_data_url = 'https://www.googleapis.com/analytics/v2.4/data';

and that seemed to somewhat solve the problem. We're still getting some rate 
limit errors, but I think they truly are rate limit problems, and not google 
api migration problems.

Original comment by interact...@gmail.com on 8 Aug 2012 at 8:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
We are receiving the same error when trying to load data. Both given report 
urls are not working and returning the same following fatal error: Uncaught 
exception 'Exception' with message 'GAPI: Failed to request report data. Error: 
"usageLimitsuserRateLimitExceededUnregUser Rate Limit Exceeded. Please sign 
uphttps://code.google.com/apis/console"' in 
/home/tgbmt/public_html/classes/gapi.class.php:225

Original comment by goo...@triglobal.org on 13 Aug 2012 at 9:27

GoogleCodeExporter commented 9 years ago
Same error here as well when running gapi->requestReportData(). I tried 
changing report_data_url as mentioned above and it did not help. Problem just 
started happening recently.

Original comment by vitalaa...@gmail.com on 14 Aug 2012 at 8:38

GoogleCodeExporter commented 9 years ago
I've got the same error when i use requestReportData(), Then I've enabled 
Analytics Api from code.google.com/apis/console and it didn't help.

After that I've looked at "Traffic Reports for API Project" from google 
console, and strange there is no analytics (quotas) tracking per day (seems api 
is not tracking requests count per day). Is this problem related to this bug?

Also, I've tried to call requestReportData() via using php function sleep(10) 
(delay per 10 second request) and its working for me now, I know its 
temporarily solution for now.

Can you please help to solve this problem

Original comment by smirsai...@dealerfire.com on 15 Aug 2012 at 9:10

GoogleCodeExporter commented 9 years ago
The "usageLimitsuserRateLimitExceededUnregUser Rate Limit Exceeded. Please sign 
uphttps://code.google.com/apis/console" is worded such that it thinks I am an 
unregistered user, which I am not. I am authenticating using my Google account 
and I have enabled Analytics API as well. Similar to the previous post, I also 
show no data under the Reports section of https://code.google.com/apis/console/.

Original comment by vitalaa...@gmail.com on 15 Aug 2012 at 9:25

GoogleCodeExporter commented 9 years ago
Same issue for me.
See the page http://alidade.eu/

Original comment by sokom...@gmail.com on 16 Aug 2012 at 8:30

GoogleCodeExporter commented 9 years ago
Same here.

Original comment by dgur...@gmail.com on 17 Aug 2012 at 11:57

GoogleCodeExporter commented 9 years ago
Same here.

Original comment by cedric.f...@gmail.com on 20 Aug 2012 at 11:47

GoogleCodeExporter commented 9 years ago
any update ? 

I follow this and it works yesterday, but still meet the same problem today.

The "usageLimitsuserRateLimitExceededUnregUser Rate Limit Exceeded. Please sign 
uphttps://code.google.com/apis/console" is worded such that it thinks I am an 
unregistered user, which I am not. I am authenticating using my Google account 
and I have enabled Analytics API as well. Similar to the previous post, I also 
show no data under the Reports section of https://code.google.com/apis/console/.

Original comment by ttcat0...@gmail.com on 21 Aug 2012 at 2:19

GoogleCodeExporter commented 9 years ago
I am facing this problem in the evening time, in the morning the website works 
fine but as the time goes the problem starts coming up in the evening may be 
because of the site load.
i had already registered the app on the google api console and increased the 
per user limit from one query per second to its maximum limit of 10 query per 
second

Original comment by nic...@gmail.com on 21 Aug 2012 at 2:27

GoogleCodeExporter commented 9 years ago
To 11,

And it's work fine with you now? I adjust the limit per user but nothing 
change. 

Original comment by ttcat0...@gmail.com on 21 Aug 2012 at 6:34

GoogleCodeExporter commented 9 years ago
To 12,
NO :( , as i said that increasing the limit doest make any changes the error 
still persist.

My main concern is that if this is the problem of the limit or number of 
requests per day then why its work fine on the my local while at the same time 
i get error on the production site.

Hope we get some solution soon!! 

Original comment by nic...@gmail.com on 22 Aug 2012 at 4:56

GoogleCodeExporter commented 9 years ago
I've found something that works for me.

You must to sign up here : https://code.google.com/apis/console
And add '$parameters['key'] = 'your API key';' after line 207 : 
'$parameters['prettyprint'] = gapi::dev_mode ? 'true' : 'false';'

Original comment by cyprien....@gmail.com on 23 Aug 2012 at 2:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
To 14.

did you mean create a "Simple API Access"

Then plaste the key to $parameters['key'] = 'your API key' ?

There's no more limit error but I get "usageLimitsaccessNotConfiguredAccess" 
now.

Could you tell me the endpoint of your "const report_data_url (Line 33)" 
And How you set up the API KEY ??

Please !! Thanks !!!

Original comment by ttcat0...@gmail.com on 23 Aug 2012 at 4:13

GoogleCodeExporter commented 9 years ago
I use 
https://developers.google.com/analytics/resources/articles/gdata-migration-guide
 (Active (requests to this API will return a Core Reporting API v2.4 response 
by the end of July 2012). See Final Reminder: Upgrade to the new Core Reporting 
API. )
to solve the problem and all the answers below:
1 - change Request Base URL : const report_data_url = 
'https://www.googleapis.com/analytics/v2.4/data';
2 - add param key $parameters['key'] = 'your API key' 
3 - add a sleep after receiving response : usleep(100000); //depends the number 
of request/user/second you specify in console

in the google console API I enable analytics API and generate a key

it works for me!

Original comment by nicheval...@gmail.com on 24 Aug 2012 at 8:24

GoogleCodeExporter commented 9 years ago
Thanks, instruction from  comment #17 solves the problem for me too. Will this 
changes committed to new version of module?
And saving API key into module is not so good, better is to add this into 
function __construct().

Original comment by Mur...@gmail.com on 24 Aug 2012 at 8:36

GoogleCodeExporter commented 9 years ago
I have added the api key on $parameters['key'] and now I am getting this error.

Exception: GAPI: Failed to request report data. Error: 
"usageLimitsaccessNotConfiguredAccess Not Configured" in 
gapi->requestReportData() 

Any ideas why its doing that

Thanks

Neela

Original comment by ne...@gofobo.com on 27 Aug 2012 at 9:57

GoogleCodeExporter commented 9 years ago
find it:
public function requestReportData($report_id, $dimensions, $metrics, 
$sort_metric=null, $filter=null, $start_date=null, $end_date=null, 
$start_index=1, $max_results=30)
  {
    $parameters = array('ids'=>'ga:' . $report_id);

and update for this:
public function requestReportData($report_id, $dimensions, $metrics, 
$sort_metric=null, $filter=null, $start_date=null, $end_date=null, 
$start_index=1, $max_results=30)
  {
    $parameters = array('ids'=>'ga:' . $report_id);

    $parameters['key'] = 'your key';

it works for me

Original comment by verifyad...@gmail.com on 31 Aug 2012 at 3:17

GoogleCodeExporter commented 9 years ago
faced with the same problem. made all possible changes, tried all of the 
recommendations, the result is not! any ideas gone? GAPI update expected?

Original comment by serg.shi...@gmail.com on 11 Sep 2012 at 11:22

GoogleCodeExporter commented 9 years ago
delete the app and recreate a new one then use the code modify above by comment 
20. My problem fixed.

Original comment by ttcat0...@gmail.com on 11 Sep 2012 at 12:46

GoogleCodeExporter commented 9 years ago
I also got this issue, same thing did as comment 21, but nothing changed, I did 
not set Project ID in console (the way to open it can be found in where the 
line 'Register...' is). So anyone get any ideas? Thanks!

Original comment by analyt...@sohalo.com on 12 Sep 2012 at 3:32

GoogleCodeExporter commented 9 years ago
I had the same problem,
adding a token to the class declaration
it works for me
for the creation of the token, I use Zend Framework as follows:
$client = Zend_Gdata_ClientLogin :: getHttpClient ('me@gmail.com' 
'mypassword','analytics');
$token = $client-> getClientLoginToken ();
and then
new gapi ('me@gmail.com' 'mypassword ', $token);

Original comment by risht...@gmail.com on 5 Oct 2012 at 10:05

GoogleCodeExporter commented 9 years ago
- Created a simple API access key at https://code.google.com/apis/console
- Changed gapi.class.php as said in Comment 20...

=> Worked perfect! Thanks.

Original comment by milherou...@gmail.com on 7 Oct 2012 at 5:26

GoogleCodeExporter commented 9 years ago
I confirm comment 25
It works for me!

Original comment by alida...@gmail.com on 2 Nov 2012 at 9:39

GoogleCodeExporter commented 9 years ago
Comment 20 worked for me. Didnt have to change API key as said in comment 22

Original comment by i...@overalia.com on 28 Nov 2012 at 2:07

GoogleCodeExporter commented 9 years ago
Worked perfect for me as explained in comment 17!
Many Thanks.

Original comment by i...@pixelus.fr on 28 Nov 2012 at 4:46

GoogleCodeExporter commented 9 years ago
Shouldn't the API key be in the constructor? It should be something like:

__construct($email, $password, $api_key=null, $token=null){
  if (isset($api_key))
    $this->api_key = $api_key;
....

Then you would do
if ($this->api_key)
  $parameters['key'] = $this->api_key;

That would allow you to not have to hardcode the API key.

Original comment by jrcallic...@gmail.com on 28 Nov 2012 at 4:54

GoogleCodeExporter commented 9 years ago
Hi!
Everything worked perfectly before moving script on the new server. Now again 
get GAPI: Failed to request report data. Error: 
"usageLimitsaccessNotConfiguredAccess Not Configured"
What might be an idea?
Maybe this is important, the upgrade PHP 5.2->5.3
Tnx!

Original comment by serg.shi...@gmail.com on 15 Jan 2013 at 9:31

GoogleCodeExporter commented 9 years ago
I also got that error but now fixed with #17. Thanks
But my question is what is query limit means. As I am doing in one 
requestReportData() & limit 10000 rows maximum( generally got less than 1000 
itself) and around 250 times i am calling this function. But what is the limit 
means exactly.

I want to know the limit is of Query(means function) or getting the rows from 
the Data.
and how can i know that what is my limit for this.

Original comment by anubhavf...@gmail.com on 21 Feb 2013 at 5:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It still doesn't work for me, any update? I've tried everything

Original comment by Courten...@gmail.com on 2 Jul 2013 at 1:05

GoogleCodeExporter commented 9 years ago
Got the same issue !

Added $parameters['key'] = 'your key'; as #20 then I had following error 
message :

GAPI: Failed to request report data. Error: 
"usageLimitsaccessNotConfiguredAccess Not Configured"

Checked on Services and found Analytics API off !
I turned ON and all works great now.

Original comment by jacques....@gmail.com on 10 Jul 2013 at 2:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
#20 works prfct with GAPI 1.3 thx! 

Original comment by f...@flumedia.ch on 13 Aug 2013 at 4:04

GoogleCodeExporter commented 9 years ago
This also worked for me as well:
1 - change Request Base URL : const report_data_url = 
'https://www.googleapis.com/analytics/v2.4/data';
2 - add param key $parameters['key'] = 'your API key' 
3 - add a sleep after receiving response : usleep(100000); //depends the number 
of request/user/second you specify in console

Original comment by 360train...@gmail.com on 21 Nov 2013 at 8:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
this is not working for me, I did all three things. Im using a localhost, might 
that be the problem?

still getting: GAPI: Failed to request report data. Error: 
"usageLimitsaccessNotConfiguredAccess Not Configured"

Original comment by ganalyti...@gmail.com on 20 Dec 2013 at 9:40

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Since today i also get the error "usageLimitsuserRateLimitExceededUnregUser"
After doing #17 and #20 I get the error "usageLimitsaccessNotConfiguredAccess 
Not Configured"

Can somebody please explain how to get this solved?

Api is "ON" in console, and I got a webhost api key.

Original comment by timm...@gmail.com on 3 Apr 2014 at 1:15

GoogleCodeExporter commented 9 years ago
Same problem than #41, error "usageLimitsaccessNotConfiguredAccess Not 
Configured".

In #17 : 
3 - add a sleep after receiving response : usleep(100000); //depends the number 
of request/user/second you specify in console

Where do i have to put usleep(xxxx); ? 

Many thanks

Original comment by d.r...@fair-media.fr on 17 Apr 2014 at 12:10

GoogleCodeExporter commented 9 years ago
Same problem

Hey, the actual error was

Array
(
    [body] => usageLimitsuserRateLimitExceededUnregUser Rate Limit Exceeded. Please sign uphttps://code.google.com/apis/console
    [code] => 403
)

Original comment by jslimetr...@gmail.com on 17 Jul 2014 at 6:19

GoogleCodeExporter commented 9 years ago
The only way to resolve this is to add a server key also along with the 
credentials, but I tried adding setDeveloperKey in the function 
authenticateUser. But it didn't work. Has anyone resolved the error?

    protected function authenticateUser($email, $password)
    {
        $post_variables = array(
            'accountType' => 'GOOGLE',
            'Email' => $email,
            'Passwd' => $password,
            'setDeveloperKey'=>'my-created-server-key',
            'source' => gapi::interface_name,
            'service' => 'analytics'
        );

Original comment by jslimetr...@gmail.com on 17 Jul 2014 at 6:23

GoogleCodeExporter commented 9 years ago
You must to sign up here : https://code.google.com/apis/console , and get the 
API Key which would be required to be added in the application.

And than add this: '$parameters['key'] = '<API KEY>';
after this line: '$parameters['prettyprint'] = gapi::dev_mode ? 'true' : 
'false';'

Also check the Services and make sure the Analytics API is ON.

Original comment by eran...@gmail.com on 18 Jul 2014 at 7:02

GoogleCodeExporter commented 9 years ago
 You must to sign up here : https://code.google.com/apis/console
And add '$parameters['key'] = 'your API key';' after line 207 : 
'$parameters['prettyprint'] = gapi::dev_mode ? 'true' : 'false';'

Comment 14 works for me after ater adding ip after line no 207 of gapi.class.php

Original comment by vizzweb...@gmail.com on 31 Mar 2015 at 12:41