Strange problem GA Api V3 with Service account auth

7,032 views
Skip to first unread message

OsDev

unread,
Apr 23, 2013, 8:18:14 AM4/23/13
to google-analytics...@googlegroups.com
hi all im having a hard time making a project to work . 

last week i created i created two reporting projects no problems at all , in total now  i got 3 i wanna make the fourth urgent for a client and im getting 403 error code out of no where  i fallowed the same procedures as the last project no success  . 

Google.Apis.Requests.RequestError

User does not have any Google Analytics account. [403]

Errors [

Message[User does not have any Google Analytics account.] Location[ - ] Reason[insufficientPermissions] Domain[global]

]


i event deleted the project in google console api three times get the service account email that the provide i added in google , i done it as Administrator as user  nothing , i searched in the internet and i found that alot of people having this problem , all the solutions was related to set the service email account to user instead of admin , the strange thing is the other projects i got this email as admin in google analytics and in the console as owner (team tab)   and its working perfect no problem this  one nothing so far and i lost patient . what else could i do ? any help will be appreciated as its  really urgent . Thank you all for your time .

Guf

unread,
Apr 23, 2013, 9:32:37 AM4/23/13
to google-analytics...@googlegroups.com
Having same problem. Are you using Service Account, right?

Within this StackOverflow discussion http://goo.gl/xnkvQ they say that we just need to share the GA account to the email x...@developer.gserviceaccount.com 

It doesn't work anyway lol

This is what happens when there is a serious lack of documentation!

OsDev

unread,
Apr 23, 2013, 9:40:29 AM4/23/13
to google-analytics...@googlegroups.com
ya im using service account Guf , the strange  thing  is i got three project with service account email as admin and  as owner in google console api and its working since day one  , with this one nothing at all, sometimes  i hate google they make money from nowhere they dont even bother changing they products or their apis shame on you 

OsDev

unread,
Apr 23, 2013, 10:47:22 AM4/23/13
to google-analytics...@googlegroups.com
Nothing  ? 

Guf

unread,
Apr 23, 2013, 11:44:37 AM4/23/13
to google-analytics...@googlegroups.com
Tried with another account and conf, same issue here.

Someone can assist us on this issue? 

Thanks

On Tuesday, April 23, 2013 4:47:22 PM UTC+2, OsDev wrote:
Nothing  ? 

marada

unread,
Apr 23, 2013, 12:23:15 PM4/23/13
to google-analytics...@googlegroups.com
Same for me. I have been trying to resolve that issue for 8 hour now with no success.
I tried different combinations, solutions with no success.
Below is my piece of code that I changed in analytics example

  private static Credential authorize() throws Exception {

 GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)
   .setJsonFactory(JSON_FACTORY)
   .setServiceAccountId("xx...@developer.gserviceaccount.com")
   .setServiceAccountScopes(AnalyticsScopes.ANALYTICS_READONLY)
   .setServiceAccountPrivateKeyFromP12File(new File("gba-privatekey.p12"))
   .build();
    return credential;

Michal Franc

unread,
Apr 23, 2013, 12:34:25 PM4/23/13
to google-analytics...@googlegroups.com
Same problem for me .. i have two different service accounts. One is working correct but second one (created today) wasn't able to get any data from profiles (and i have this user correctly added to desired profile)

Exception in thread "main" com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "global",
    "message" : "User does not have any Google Analytics account.",
    "reason" : "insufficientPermissions"
  } ],
  "message" : "User does not have any Google Analytics account."
}


Dne úterý, 23. dubna 2013 18:23:15 UTC+2 marada napsal(a):

Jeetendra S.

unread,
Apr 23, 2013, 12:43:36 PM4/23/13
to google-analytics...@googlegroups.com
Can you email me the id of your service account? I can look into it.
Message has been deleted

Kevin Dwyer

unread,
Apr 23, 2013, 3:43:35 PM4/23/13
to google-analytics...@googlegroups.com
Hello Jeetendra,

Are you able to check service accounts for my similar issue too (https://groups.google.com/forum/?fromgroups=#!topic/google-analytics-data-export-api/9ClTNHeGnLc)?  If so please send me your e-mail address so I can send them to you.

Thanks

Jeetendra S.

unread,
Apr 23, 2013, 5:11:12 PM4/23/13
to google-analytics...@googlegroups.com
Hi all,

We did find an issue on our end and it should be fixed now. Please let us know if this continues to happen for you.

Sorry for any inconvenience.


On Tuesday, April 23, 2013 5:18:14 AM UTC-7, OsDev wrote:

Kevin Dwyer

unread,
Apr 23, 2013, 5:16:53 PM4/23/13
to google-analytics...@googlegroups.com
Hello Jeetendra,

It's looking better now.  We'll post a new message if there's any recurrence.

Thanks

Kevin

marada

unread,
Apr 23, 2013, 5:41:55 PM4/23/13
to google-analytics...@googlegroups.com
It has just started working :-)
Strange.

Guf

unread,
Apr 24, 2013, 6:33:49 AM4/24/13
to google-analytics...@googlegroups.com
It works like a charm now!

Thanks

hk...@everydayhealthinc.com

unread,
Apr 25, 2013, 2:39:21 AM4/25/13
to google-analytics...@googlegroups.com
Suddenly since last 3- 4 days I am facing issues with all my Google Analytics API Projects

Is this a temporary issue or is there any changes happening?

Jeff Seger

unread,
Apr 26, 2013, 12:26:25 PM4/26/13
to google-analytics...@googlegroups.com
OK, so I am brand new to this and unsure if it is my error, or something wrong with our corporate account, but I am getting this same error when trying to connect using a plugin for Talend.  I am using the xx...@developer.gserviceaccount.com as the service account email, and the downloaded .p12 file as the key file.



Exception in component tGoogleAnalyticsInput_1
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden 
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "User does not have any Google Analytics account.",
"reason" : "insufficientPermissions"
} ],
"message" : "User does not have any Google Analytics account."
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:143)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:114)

CONFIDENTIALITY NOTICE

The attached information is PRIVILEGED AND CONFIDENTIAL and is intended only for the use of the addressee named above.  If the reader of this message is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, please be aware that any dissemination, distribution or duplication of this communication is strictly prohibited. If you receive this communication in error, please notify us immediately by telephone, delete the message and destroy any printed copy of the message. Thank you.

Message has been deleted
Message has been deleted

Jeetendra Soneja

unread,
May 20, 2013, 4:58:41 PM5/20/13
to google-analytics...@googlegroups.com
The error "403, User does not have any Google Analytics account" indicates the user that you are trying to access data for is not on any of your GA accounts. If you're using a robot account, you would need to add its email (which you can find in the APIs console) to one or more GA accounts.



On Mon, May 20, 2013 at 2:20 AM, EM Developer <globe.ei...@gmail.com> wrote:
It appears that having the browser (Internet Explorer) logged with another account and visiting the page which is doing the calls to the GA api service is also creating other types of issues.
The result is:

- logged in with another user: got 403 "user does not have any...."
- logged in with the same user or not logged in: the view data button does not appear and if I call explicitely the makeApiCall function I don't get any result

Thanks again for any support or feedback.

Il giorno lunedì 20 maggio 2013 11:05:15 UTC+2, EM Developer ha scritto:
Hello, is the issue solved or do we have to do something on our side? I am following the GA API step by step tutorial and I got stuck on the same problem. I also tried adding the gdeveloper email of the API service on my GA account but nothing, still the same error.

Thank you in advance.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-data-export-api/aBqg0EOi46Q/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ирина Т

unread,
May 29, 2013, 8:59:54 AM5/29/13
to google-analytics...@googlegroups.com
And if i have more then 513 profiles and i cant add service email to each of it, is there any other way, can i change service email, to my account mail, to get info??

понедельник, 20 мая 2013 г., 23:58:41 UTC+3 пользователь Jeetendra S. написал:
To unsubscribe from this group and all its topics, send an email to google-analytics-data-export-api+unsubscribe@googlegroups.com.

Jeetendra Soneja

unread,
May 29, 2013, 12:49:29 PM5/29/13
to google-analytics...@googlegroups.com
Unfortunately, you'll have to add those profiles to the service account manually. Currently we don't have an API to manage users, but it's something we are looking into. Also, a service account is a robot account (different from your regular Google account) and its email cannot be changed.



To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.

Ирина Т

unread,
May 30, 2013, 3:17:26 AM5/30/13
to google-analytics...@googlegroups.com
And if i try too connect my account mail and service mail? can that help?, its writing that my service mail is already connected what does it meen?

среда, 29 мая 2013 г., 19:49:29 UTC+3 пользователь Jeetendra S. написал:

Alex Lhomme

unread,
May 30, 2013, 8:46:23 AM5/30/13
to google-analytics...@googlegroups.com
Hi It still not working for me anyway.
I add my auth2 email to my GA Account but the same error message.

Any Ideal???


On Tuesday, 23 April 2013 17:43:36 UTC+1, Jeetendra S. wrote:

Jim Sidler

unread,
Jun 9, 2013, 12:35:10 AM6/9/13
to google-analytics...@googlegroups.com
Can you point me to where I might learn how to get an app authorized to use a service account to get access to many profiles? My application needs to create a content experiment on behalf of the user who signed up for my service. surely I am not expected to have the end user add my service account email address just so I can manage experiments for them programmatically right?

Jeetendra Soneja

unread,
Jun 9, 2013, 1:09:28 AM6/9/13
to google-analytics...@googlegroups.com
Service accounts are really meant for *end users* who actually own or have access to an account/profile, and would like to automate certain operations via the API. Therefore, a user cannot use their service account to grant an app access to their GA data.

If the user wants to use your app, they must authorize the app to access their data using their regular Google account and not the service account.

Hope that helps.



To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.

m.d...@pckado.com

unread,
Jul 16, 2013, 8:48:07 AM7/16/13
to google-analytics...@googlegroups.com
Hello,
I'm using Talend ETL and I try to feed datawerehouse with google analytics data.
In google apis console , i created an api access :
client ID: xxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
Email address:     xxxxxxxxxx...@developer.gserviceaccount.com
in Team tab, permissions is granted to the email address xxxxxxxxxx...@developer.gserviceaccount.com as owner

In google analytics, i created a new user for the email address as admin

and i still have this error message :

Exception in component tGoogleAnalyticsInput_1
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "global",
    "message" : "User does not have sufficient permissions for this profile.",
    "reason" : "insufficientPermissions"
  } ],
I'm trying different options for 3 days (team tab : as owner, as user, as viewer / in GA email as user, as admin) and nothing but error 403,
if you have any idea to fix it, i'm really interested (i admit i have no more idea).

Ivision Dev

unread,
Aug 20, 2013, 5:02:06 AM8/20/13
to google-analytics...@googlegroups.com
Hello,

I have the same problem (403- User does not have any Google Analytics account).
1. I have generated a service account and enabled the GA service.
2. I've added this account to my GA account.
Still when I tried to access this account using the api v3, I recieved this error.

Please consult!!?
Thank you!!
Amir

grzegorz....@allegro.pl

unread,
Aug 20, 2013, 6:38:35 AM8/20/13
to google-analytics...@googlegroups.com
Hi, 

having similiar issue. I'm having access to 14 accounts, but after using api v3 I see only 4 of them. Where is the problem?

Thx
Reply all
Reply to author
Forward
0 new messages