rgroult / google-apis-explorer

Automatically exported from code.google.com/p/google-apis-explorer
Apache License 2.0
0 stars 0 forks source link

Проблема работы с google analytics через API (v3) #104

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.https://developers.google.com/apis-explorer/#s/analytics/v3/analytics.data.ga.
get
2.
ids: ga:43577909
start-date: 2013-09-02
end-date: 2013-09-02
metrics: ga:visits

3. Authorize requests using OAuth 2.0:

Даю доступ от имени  stat.kupislova@gmail.com

What is the expected output? What do you see instead?

Я должен был получить статистику визитов 
за 2013-09-02.
Однако я вижу ошибку 

403 

- Show headers -

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "insufficientPermissions",
    "message": "User does not have sufficient permissions for this profile."
   }
  ],
  "code": 403,
  "message": "User does not have sufficient permissions for this profile."
 }
}

Аналогично в программе http://kupidirect.ru/google.php

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

Core Reporting API (v3)

Please provide any additional information below.

Как так получается, что доступ от имени 
stat.kupislova@gmail.com я даю, но система пишет, что у 
пользователя недостаточно прав? Где мне 
нужно еще дать права, чтоб получить 
результа ? 

PS: ga:43577909

 [10] => Array
                (
                    [id] => UA-43577909-1
                    [kind] => analytics#webproperty
                    [selfLink] => https://www.googleapis.com/analytics/v3/management/accounts/43577909/webproperties/UA-43577909-1
                    [accountId] => 43577909
                    [internalWebPropertyId] => 73641953
                    [name] => www.bianco.ru
                    [websiteUrl] => http://www.bianco.ru
                    [level] => STANDARD
                    [profileCount] => 1
                    [industryVertical] => JOBS_AND_EDUCATION
                    [created] => 2013-08-28T10:10:03.792Z
                    [updated] => 2013-08-28T10:17:55.443Z
                    [parentLink] => Array
                        (
                            [type] => analytics#account
                            [href] => https://www.googleapis.com/analytics/v3/management/accounts/43577909
                        )

                    [childLink] => Array
                        (
                            [type] => analytics#profiles
                            [href] => https://www.googleapis.com/analytics/v3/management/accounts/43577909/webproperties/UA-43577909-1/profiles
                        )

                )

Original issue reported on code.google.com by stat.kup...@gmail.com on 2 Sep 2013 at 7:36

GoogleCodeExporter commented 8 years ago
РАЗОБРАЛС В СВОЕЙ ОШИБКИ, подставлял не ID 
профайла, а айди аккаунта, чтоб узнать ID  
всех профайлов 
https://developers.google.com/apis-explorer/#s/analytics/v3/analytics.management
.profiles.list?accountId=~all&webPropertyId=~all&_h=5&

Original comment by stat.kup...@gmail.com on 2 Sep 2013 at 9:07